| Well, it may be slower, but better slower, than no auditing. Maybe one could introduce a parameter to enable/disable that behavior. But nevertheless, I think this issue can be solved with this little pseudo code:
On CriteriaDelete: delete from TABLE where CONDITIONS
One could do (before the delete executes): insert into TABLE_AUDIT select AUDIT_COLOMS from TABLE where CONDITIONS
For CriteriaUpdate: update TABLE set COLUMNS=VALUES where CONDITIONS
One could do (before executing the update):
if one of COLOMS is audited {
insert into TABLE_AUDIT select AUDIT_COLOMS from TABLE where CONDITIONS
}
That is the way I am doing it now, so it is possible. And it is not that slow. But of course, Envers is a bit more complex, so this pseudo code may not work for every use case. |