Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2645

merge() not dealing correctly with composite primary keys

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.4
    • Fix Version/s: 2.4.2
    • Component/s: ORM
    • Security Level: All
    • Labels:

      Description

      $entity=$em->merge($entity);

      fails for entity with composite keys:
      http://pastebin.com/iz6UACf9


      Calling flattenIdentifier() from:

      returns only array of foreign keys (integer primary key ignored)

      Causing this exception to be thrown:

        Activity

        Hide
        Pouyan Savoli added a comment -

        I haven't seen any comments or progress on this issue.

        So I came up with a fix for flattenIdentifier my self:
        http://pastebin.com/hvVRaU8z

        Can this be pushed to repos once its validated?

        Show
        Pouyan Savoli added a comment - I haven't seen any comments or progress on this issue. So I came up with a fix for flattenIdentifier my self: http://pastebin.com/hvVRaU8z Can this be pushed to repos once its validated?
        Hide
        Lars Heß added a comment -

        Same problem here, please fix this issue asap! )

        Show
        Lars Heß added a comment - Same problem here, please fix this issue asap! )
        Hide
        Benjamin Eberlei added a comment -

        Fixed and merged for 2.4.2

        Show
        Benjamin Eberlei added a comment - Fixed and merged for 2.4.2

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Pouyan Savoli
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: