Question

I am trying to integrate Envers in an existing nHibernate Database. I need the default or the original AUD values in the respective *_AUD tables. i.e initial value, else when the first time the user modifies it, only modified values are recorded but a user cant see the previous version of it.

Cant force save every entity without a modification..

Must be a commong scenario ... Let me know if anyone implemented it.

--Sukumar

Was it helpful?

Solution

There is no built in functionality in Envers for this, but it should be easy to create the db script yourself. Simply copy all existing data (that's audited) to the audit tables once with revtype 0 (=ADD) pointing to the new Revision 1.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top