Skip to content

Commit

Permalink
HHH-12683 - Add note about CriteriaUpdate/CriteriaDelete not captured…
Browse files Browse the repository at this point in the history
… by Envers.
  • Loading branch information
Naros committed Jun 18, 2018
1 parent d4861fe commit 39cd150
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -20,6 +20,13 @@ Just putting the Envers jar on the classpath is enough because listeners will be
And that's all.
You can create, modify and delete the entities as always.

[IMPORTANT]
====
The use of JPA's `CriteriaUpdate` and `CriteriaDelete` bulk operations are not currently supported by Envers
due to how an entity's lifecycle events are dispatched. Such operations should be avoided as they're not
captured by Envers and leads to incomplete audit history.
====

If you look at the generated schema for your entities, or at the data persisted by Hibernate, you will notice that there are no changes.
However, for each audited entity, a new table is introduced - `entity_table_AUD`, which stores the historical data, whenever you commit a transaction.

Expand Down

0 comments on commit 39cd150

Please sign in to comment.