keybored
keybored

Reputation: 5248

Storing database changes in Symfony 2.1

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

Answers (2)

keybored
keybored

Reputation: 5248

Unfortunately I ended out having to write my own logging using LifeCycle callbacks. Pazi's answer is really cool though.

Upvotes: 0

Emii Khaos
Emii Khaos

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

Related Questions