| So I believe the best path forward to resolving this is to simply add a revision number check after we persist the revision entity that verifies that the revision number assigned by the database is non-negative. In the event that a revision number is in-fact negative, Envers will now throw an AuditException. Given we want to guarantee consistency of the audited data, its likely the best practice to rollback such a transaction rather than merely log a warning of the problem and allow it to be persisted. See PR https://github.com/hibernate/hibernate-orm/pull/3132 for details. |