Reputation: 5248
I have a site where customer service personnel can create, update, and delete various records. I also have a table to store information about changes to the other tables. Is there an automated way I could ensure this storage script always gets run or do I need to drop a persist call in after every update, create, and delete? Thanks.
Upvotes: 0
Views: 45
Reputation: 5248
Unfortunately I ended out having to write my own logging using LifeCycle callbacks. Pazi's answer is really cool though.
Upvotes: 0
Reputation: 10085
I think you could be interested in the Loggable behaviour of the Doctrine Extensions. For Symfony it's implemented in the StofDoctrineExtensionsBundle.
Autonomous logging and more tested and reliable as own solutions ;)
Upvotes: 1