Uploaded image for project: 'Doctrine 1'
  1. Doctrine 1
  2. DC-563

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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
        rdehouss 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
        rdehouss 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
        jwage 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
        jwage 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
        rdehouss 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
        rdehouss 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
        rdehouss Raphaël Dehousse added a comment -

        Here is the patch as promised

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

        Thanks for the patch

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: