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.

  1. who changed what? - store user credentials in revinfo table.
  2. from what? - quite general question :). try exploring org.hibernate.envers.auditreader , org.hibernate.envers.query.auditquerycreator.
  3. at time? - timestamp stored in revinfo table. timestamp reflects time when user has commited changes.

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -