In my project I have gotten the following error behaviour of envers:
if I use this code to delete my entites : EntityManager em => em.remove(...) then the deleted entities are written to the history table, but....
if the following code is used to delete multiple entites at a time ("batch delete") => em.createQuery("delete entity e where e.prop1 = xyz").executeUpdate(); envers doesn't write anything to the audit table. Can it be, that Hibernate listeners which envers is using to hook into the entity lifecycle are not working properly with bulk updates?
I am intending to open a new JIRA issue on this, just being curious if someone else has encountered the same problem....
bulk operations are translated directly to SQL and don't go through the events system, that's why each bulk operation must have a manual bulk counterpart on the history tables.