I’m using Hibernate envers for auditing, and most of my tables are performing batch inserts just fine. However, on one of my entities I have an audited collection, which seems like it doesnt want to batch. MyEntity: (Not sure if this is important, Im using postgresql). In the logs I see 1000s of these s…
Tag: hibernate-envers
How to choose fields for auditing with Hibernate Envers?
I’m using Hibernate Envers in Spring Boot application with Spring Data. For example, I have a base class And class I need to audit only actions that were done and the timestamp of them. For example, when I create new Entity or update existing Entity object, I want auditing table to contain the following…
Why AuditReader can’t be Autowired in the Repository
IN my springbootapp I have the following repository:- When I run this app. I got this error:- Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled. 2020-12-24 21:09:15 – APPLICATION FAILED TO START Description: Parameter 0 of constr…
How to inject spring beans into the hibernate envers RevisionListener
I am using Spring 5.1 and Hibernate 5.3.9 including hibernate-envers. I don’t know how to inject spring beans into the hibernate envers custom RevisionListener. I have tried Of course the class is included in the @ComponentScan packages resolution. A problem is that myService is not injected into the li…
What is the primary key of an audit table managed by Hibernate Envers?
I am using Hibernate Envers to audit some entities. I manually created the associated audit tables. However, I am having trouble determining what an audit table’s primary key should be. For example, consider a fictional table designed to store customers: And you create the audit table: Here were the opt…