For other readers, i managed to get the previous state by calling $persistentCollection->getSnapshot()
On Monday, June 30, 2014 5:13:17 PM UTC+2, Flat wrote: > > I do have another question about this. It seems there is no way to detect > _what_ has been changed? > > In this case i'm adding 1 new element to a Entity through a > many-to-many-relation. When calling getScheduledCollectionUpdates() i get, > of course, the PersistentCollection with the changed values, including the > newly added element. > When calling getOriginalEntityData() i does not seem to have any > many-to-many relations at all, it looks like the UOW does not provide > information anywhere about the original state of this many-to-many > relation, is that right? > > > On Monday, June 23, 2014 4:37:54 PM UTC+2, Marco Pivetta wrote: >> >> There's a dedicated API for checking collection updates, since >> collections are tracked differently from entities: >> >> - Doctrine\ORM\UnitOfWork#getScheduledCollectionUpdates() >> - Doctrine\ORM\UnitOfWork#getScheduledCollectionDeletions() >> >> See also http://stackoverflow.com/a/15374589/347063 >> >> Marco Pivetta >> >> http://twitter.com/Ocramius >> >> http://ocramius.github.com/ >> >> >> On 23 June 2014 16:34, Flat <[email protected]> wrote: >> >>> I'm on Doctrine/ORM version 2.4.3 >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "doctrine-user" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/doctrine-user. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
