I have a User entity and I want to update its 'updated' datetime field everytime an association is set/added/created/edited/removed (be it OneToOne or OneToMany). Basically I want to know when something related to the user has changed in my application.
On top of that, is it recommended to always add association by calling ->addXXX($xxx) from the user entity and cascade persist it? In some parts of my application I set the user from the other side of the relationship, and when using Symfony2 forms it does it that way automatically (I think?).
What would be the best approach? Manually doing it in every method of associated entities that set the user would be overkill.