Manually create audit table for Hibernate Envers

I understand that Envers generates a table to store the audit trail. Is it possible to manually assign the table where I want the data to be stored. Instead of Envers generating the table yourself?

+3


source to share


1 answer


It will only generate tables if you use one of the ddl auto options.

If you want to control the naming of audit tables during this process, or create the tables themselves and use them differently, you provide a value for the @AuditTable annotation and / or specify a prefix and suffix in the configuration.

Also, you can control / specify the name of the global table REVINFO using the @RevisionEntity annotation.



http://docs.jboss.org/envers/docs/#tables

All of this is detailed in the full documentation:

http://docs.jboss.org/envers/docs/#tables

+4


source







All Articles