java - How to create custom field when using hibernate anvers -
i'm starting new project using spring 3.1, hibernate 4 , there requirement track activity on application. activity tracking example who changed what? from what? , at time? i've read introductory tutorial on hibernate anvers. , me seems more of data history activity tracking unless didn't @ all.
is there way add custom field *_aud table insert more user defined table. date_created, last_modified, created_by, updated_by own databefore , dataafter kinda of fields.so add createdby , updatedby anvers created table
is there way that. if yes, please point me right resource.
thanks reading .
in envers each "production" table has corresponding *_aud table stores historical state of entities. there global revinfo (org.hibernate.envers.defaultrevisionentity) table contains revision number, timestamp , custom, user defined columns. example showing how extend defaultrevisionentity can found in documentation. there no possibility customize *_aud tables, envers should answer question have asked.
- who changed what? - store user credentials in revinfo table.
- from what? - quite general question :). try exploring
org.hibernate.envers.auditreader,org.hibernate.envers.query.auditquerycreator. - at time? - timestamp stored in revinfo table. timestamp reflects time when user has commited changes.
Comments
Post a Comment