-
1. Re: Turn off versioning
adamw Jun 5, 2009 4:58 AM (in response to kaizersh)No, that's not possible currently.
Adam -
2. Re: Turn off versioning
kaizersh Jul 3, 2009 1:53 AM (in response to kaizersh)Hi,
Could you please give me some pointers on how to achieve this? Which pieces of code in Envers would i need to touch?
Thanks.
Regards
Kaizer -
3. Re: Turn off versioning
adamw Jul 3, 2009 2:50 AM (in response to kaizersh)So what would you like to store in the audit tables? Just the data? Don't you also need to store a timestamp (which is stored in the REVINFO table)?
Adam -
4. Re: Turn off versioning
kaizersh Jul 3, 2009 2:54 AM (in response to kaizersh)Hi,
Yes we would like to store just the data. There will be a column where we will store the operation type (Insert/Update/Delete). We store fields like created by, created date, etc in the main table and so the same data would get stored in the audit table as well. We just dont need the versioning feature.
Thanks,
Regards
Kaizer -
5. Re: Turn off versioning
adamw Jul 3, 2009 4:59 PM (in response to kaizersh)Ah. Well, then you would have to remove from the Envers code the places where the revision entity is persisted and the field from the audit tables. This would be a small modification of the code.
Adam -
6. Re: Turn off versioning
kaizersh Jul 6, 2009 1:51 AM (in response to kaizersh)I think it'd be a nice feature to have in Envers itself. But in the meanwhile, could you please tell me some of the classes I need to look at so that making the changes will be faster for me. :)
Thanks,
Regards
Kaizer -
7. Re: Turn off versioning
adamw Jul 15, 2009 2:15 AM (in response to kaizersh)So, in AbstractAuditWorkUnit.fillDataWithId you'll need to remove the line where the revision number is added. Then, in AuditSync.getCurrentRevisionData you'll need to remove the revision entity generation. Finally, in AuditMetadataGenerator you should remove the lines in addRevisionInfoRelation where the relation to the rev info table is added.
Adam