Satish Patro
Satish Patro

Reputation: 4394

spring-data jpa's deleteAll() method call records are not audited in hibernate envers

By default for save(), delete(), saveAll() hibernate envers audit the record change.

But for deleteAll() it is not auditing.

Upvotes: 0

Views: 896

Answers (1)

Satish Patro
Satish Patro

Reputation: 4394

In application.properties override org.hibernate.envers.store_data_at_delete

org.hibernate.envers.store_data_at_delete = true

Default value is false

"org.hibernate.envers.store_data_at_delete" Should the entity data be stored in the revision when the entity is deleted (instead of only storing the id and all other properties as null). This is not normally needed, as the data is present in the last-but-one revision. Sometimes, however, it is easier and more efficient to access it in the last revision (then the data that the entity contained before deletion is stored twice).

Upvotes: 1

Related Questions