|
The check for a previous version is an important integrity check. This is not something we want to change. What is needed is a new feature that will generate missing audit data.
For now, an application can extend ValidityAuditStrategy and override perform() to remove this integrity check (so that a RuntimeException is not thrown) when there is no previous revision for the entity.
The custom AuditStrategy implementation class name can be provided to Hibernate using a property: org.hibernate.envers.audit_strategy.
|