Your message came through clipped: can you re-send it as a new thread? Marco Pivetta
http://twitter.com/Ocramius http://ocramius.github.com/ On Tue, Sep 26, 2017 at 4:54 PM, <[email protected]> wrote: > > Hi all, > > does any one knows how I can get the entity ManyToOne collection changes > inside Entity listener? > > I have entity Person and entity Address with ManyToOne relation (one > person has many addresses) > > I want to be able to see what is changing when the Person is changing his > Addresses > > public function preUpdate(PreUpdateEventArgs $eventArgs){ > $entity = $eventArgs->getEntity(); > if ($entity instanceof Person) { > $em = $eventArgs->getEntityManager(); > $uow = $em->getUnitOfWork(); > $changeset = $eventArgs->getEntityChangeSet(); > $original = $uow->getOriginalEntityData($owner); > > } > } > > the $changeset doesn't have Addresses info because of ManyToOne relation > $eventArgs->hasChangedField('addresses'); also doesn't know if one of the > addresses is changed. > $original also doesn't have the field address > > How can I see if the one of the addresses is changed and see the > difference (to make validation or backup for example)? > > -- > 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 https://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 https://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
