I'm new in Hiberante and Envers. I successfully implemented Hibernate Envers in my application and made audited tables and everything works fine but I'm wondering is it possible to change values in REVTYPE column in audited tables.
For now I have values 0 (ADD), 1 (MOD) and 2 (DEL). I want to know is it possible to change this values, I want to change for 0 to be for example INSERT, 1 UPDATE and 2 DELETE.
Is this possible and how?
Thank you!
Hibernate Envers provides a very simple solution for CDC (Change Data Capture). It uses the Hibernate Event system to intercept all entity state transitions and audit them. The database transaction will roll back and both the actual changes and the audit log is rolled back.
The Envers module is a core Hibernate model that works both with Hibernate and JPA. In fact, you can use Envers anywhere Hibernate works whether that is standalone, inside WildFly or JBoss AS, Spring, Grails, etc. The Envers module aims to provide an easy auditing / versioning solution for entity classes.
Additionaly, there is a "REVINFO" table generated, which contains only two fields: the revision id and revision timestamp. A row is inserted into this table on each new revision, that is, on each commit of a transaction, which changes audited data.
This is not possible right now, except for forking the project and changing the code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With