Search code examples
springhibernatejpahibernate-envers

Auditing in JPA which is similar to Hibernate envers


Does JPA provides any specification for Auditing entities.

The issue is currently we are using Hibernate envers to audit an entity in our application. I want to move out of this and implement a solution which is generic across ORM layer. as it is just for auditing purpose I have to use Hibernate API in my application


Solution

  • I don't think there is anything in the specification but... if you are using the Hibernate implementation of JPA you could likely use the Envers project with your configuration. Had a look and sure enough there is a guide to do so:

    Auditing JPA entities with Hibernate Envers