I have been using Envers for a few years. I appreciate very much this auditing tool, which has nicely replaced the home made auditing stuff I wrote before using the same mechanisms (listeners, …).
I am considering today using it for crypted data. In some tables somes columns are encrypted. I do not (!) want to track the decrypted data in the audit table. I would only like to have a modification flag set to true when the value of such a column/property is modified.
So, to put it another way, I would like to have in my ENTITY_audit table no column for the value, but only the column_mod flag. Is it possible to do that ? I carefully read the doc but found no way to do that.
It could be an additional parameter for @Audited that would be :
It seems to me that the cleaniest / less dirty way to achieve my goal with the existing version of hibernate could be to provide my own implementation of AuditStrategy. Subclassing the DefaultAuditStrategy or ValidityAuditStrategy, I could only tweak a few methods, like perform, to put dummy data in audited columns. What do you think of this idea ?