Version history for entities: Hibernate Envers
With Hibernate Envers, an entity class
Entannotated with an@Auditedannotation will automatically be stored in a tableEnt_aud. TheEnt_audtable stores revisions of all properties annotated with@Auditedor all fields from an entity when the whole class is annotated. It also stores arevvalue (global counter), which refers to a row in therevinfotable, holding information such as the timestamp of the revision. We probably can extend its capabilities to store the principal information in therevinfotable, such that we can present a log for a property or entity with revision history including the user responsible for the changes.Basic example: http://www.javaroots.com/2013/08/how-to-maintain-audit-history-in-db.html
Submitted by Elmer van Chastelet on 21 January 2015 at 10:44
Log in to post comments