What is needed is a new feature that will generate missing audit data.
This is good idea, but not applicable in my case. In my application administrator can turn audit on/off or reconfigure it at run-time (yes, this is a bit of a hack for Envers), and I cannot generate missing revisions on-line (performance problems aside, this would not work in transactional environment!)
Second, Envers works best if data is modified via entity objects. In my case, some application features are implemented with HQL (or rarely even with SQL), and it's not feasible to modify them so that they mimic Envers behavior.
The check for a previous version is an important integrity check. This is not something we want to change.
I fully understand & agree on this! It's clear to me that relaxing integrity must be configurable, not something users get by default.
For now, an application can extend ValidityAuditStrategy and override perform() to remove this integrity check
This is indeed viable option, but would require copying quite a portion of the code into the subclass. And I'm not asking for problems the next time I upgrade Envers dependency 
|