Doctrine 1
  1. Doctrine 1
  2. DC-563

Import/Pgsql: listTableRelations: bad use of strpos search composite foreign keys (patch provided)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.2.2
    • Component/s: Import/Export
    • Labels:
      None

      Description

      Dears,

      First, I would like to thank you for your great work.

      Second, the bug:

      Line ~279 in the function listTableRelations, there is a mistake in the use of strpos : strpos(',', $values[1]) and strpos(',', $values[3]), it should be strpos($values[1], ',') and strpos($values[2], ',')

      With this code, strpos always returns false and so, the composite foreign keys are not skipped as desired.

      Continue your great job

      Regards,

      Raphaël Dehousse

        Activity

        Hide
        Raphaël Dehousse added a comment -

        The fix you did does not fix the problem

        The problem is the order of the parameter in strpos

        I will create a patch this avond and attach it here

        Show
        Raphaël Dehousse added a comment - The fix you did does not fix the problem The problem is the order of the parameter in strpos I will create a patch this avond and attach it here
        Hide
        Jonathan H. Wage added a comment -

        I see, that is why patches are always preferred. it is impossible to copy and paste changes out of a comment Patches should always be attached!

        Show
        Jonathan H. Wage added a comment - I see, that is why patches are always preferred. it is impossible to copy and paste changes out of a comment Patches should always be attached!
        Hide
        Raphaël Dehousse added a comment - - edited

        Here is a patch.

        You can apply it on the last revision of the branch 1.2

        The patch is to apply on the file Doctrine/Import/Pgsql.php

        Show
        Raphaël Dehousse added a comment - - edited Here is a patch. You can apply it on the last revision of the branch 1.2 The patch is to apply on the file Doctrine/Import/Pgsql.php
        Hide
        Raphaël Dehousse added a comment -

        Here is the patch as promised

        Show
        Raphaël Dehousse added a comment - Here is the patch as promised
        Hide
        Jonathan H. Wage added a comment -

        Thanks for the patch

        Show
        Jonathan H. Wage added a comment - Thanks for the patch

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Raphaël Dehousse
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: