Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2701

Collections in originalEntityData gets over written

    Details

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

      Description

      I was trying to use the UnitOfWork::getOriginalEntityData method and i noticed that if there is a collection in that object, it changes in the uow original datas when i change it on my original object

      In my case the collection is ManyToMany unidirectional

      I think this happens because both the uow and the object work with the same reference to the collection
      maybe adding a clone of the collection instead of the real one, i don't know if it is possible

      Thank you for taking a look and for Doctrine!

      Tom

        Activity

        Thomas Klein created issue -
        Thomas Klein made changes -
        Field Original Value New Value
        Summary Collections in originalEntityData gets over writter Collections in originalEntityData gets over written
        Marco Pivetta made changes -
        Status Open [ 1 ] Awaiting Feedback [ 10000 ]
        Marco Pivetta made changes -
        Assignee Benjamin Eberlei [ beberlei ] Marco Pivetta [ ocramius ]
        Marco Pivetta made changes -
        Status Awaiting Feedback [ 10000 ] Open [ 1 ]
        Marco Pivetta made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Thomas Klein
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: