how to get previouseState without fetching from the db using hibernate interceptor to create audit trail table?
I am trying to create an Audit table that will ends looking something like that : entity,id,property,oldValue,newValue,user,timestamp using hibernate EmptyInterceptor I expect that this table will have a lot of IO's . It seems that previouseState at onFlushDirty method is not working as I expected . how can I get the old value without fetching it from the db as shown here ? I was trying to follow this post public class AuditLogInterceptor extends EmptyInterceptor { private Set inserts = new HashSet(); private Set updates = new HashSet(); private Set deletes = new HashSet(); private Map oldies