Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-3160

Regression in reComputeSingleEntityChangeset

    Details

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

      Description

      I just updated from 2.4.2 to 2.4.3 and watched most of my code break. I haven't found out all the details, but what happens is that entities passed to $em->persist() end up in UoW's entityUpdates array (even though they don't have an identity).

      I've found out that the issue goes away when I uncomment this line:

      https://github.com/doctrine/doctrine2/blob/v2.4.3/lib/Doctrine/ORM/UnitOfWork.php#L933

      I'll try to debug this further when I have some time, and will add comments then

        Issue Links

          Activity

          Hide
          flack added a comment -

          BTW: I made a unit test for this:

          https://github.com/doctrine/doctrine2/pull/1057

          Show
          flack added a comment - BTW: I made a unit test for this: https://github.com/doctrine/doctrine2/pull/1057
          Hide
          Justin Zimmerman added a comment -

          I agree with Christophe Coevoet, it seems odd that an entity would be both scheduled for insertion AND update. But, I don't know too much of the Doctrine internals to say for sure.

          I have added a pull request with what seems to work for this. As far as I can tell it passes Doctrine tests and also passes tests for the Tree features in the DoctrineExtensions project (which the DDC-2996 fix broke many portions of).

          https://github.com/doctrine/doctrine2/pull/1074

          Show
          Justin Zimmerman added a comment - I agree with Christophe Coevoet , it seems odd that an entity would be both scheduled for insertion AND update. But, I don't know too much of the Doctrine internals to say for sure. I have added a pull request with what seems to work for this. As far as I can tell it passes Doctrine tests and also passes tests for the Tree features in the DoctrineExtensions project (which the DDC-2996 fix broke many portions of). https://github.com/doctrine/doctrine2/pull/1074
          Hide
          Doctrine Bot added a comment -

          A related Github Pull-Request [GH-1057] was closed:
          https://github.com/doctrine/doctrine2/pull/1057

          Show
          Doctrine Bot added a comment - A related Github Pull-Request [GH-1057] was closed: https://github.com/doctrine/doctrine2/pull/1057
          Hide
          Doctrine Bot added a comment -

          A related Github Pull-Request [GH-1074] was closed:
          https://github.com/doctrine/doctrine2/pull/1074

          Show
          Doctrine Bot added a comment - A related Github Pull-Request [GH-1074] was closed: https://github.com/doctrine/doctrine2/pull/1074
          Show
          Marco Pivetta added a comment - Merged at https://github.com/doctrine/doctrine2/commit/a8035f25a218b5a522fa5fc76e0ce8bef4912f0d - PR at https://github.com/doctrine/doctrine2/pull/1074

            People

            • Assignee:
              Marco Pivetta
              Reporter:
              flack
            • Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: