Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doctrine Entity.... history?

I've this entity that i'm saving our database from a panel where u can do the usual (edit, add,etc..). Isn't a big one, and has around 1k rows most of the times, and probably the number will be always around that. This entity has a few fields that are a relation to other entities ones (like: location, store, brand, etc..).

With that in mind the thing i need to create is some kind of history of changes, like versions of it. The user will be able to edit the current one, or view a log of changes (a report).

I'm thinking to implement something in like onpreupdate or onprePersist, or even using a new Table for that. But i got the feeling i will be doing that it's already there, and i kinda remember reading something on doctrine guide long time ago about revisions and such but can't find it.

Maybe someone can point me out something or even suggest a better way of do it.

like image 383
Ron Avatar asked Apr 08 '13 15:04

Ron


1 Answers

https://github.com/Atlantic18/DoctrineExtensions

Has a loggable extension that "Loggable - helps tracking changes and history of objects, also supports version managment."

like image 81
Fred Jiles Avatar answered Oct 15 '22 15:10

Fred Jiles