votensa.blogg.se

Auditreader list all revisions
Auditreader list all revisions





auditreader list all revisions

Even in that case, you can use Envers on its own to obtain that information if required.īe aware that, as indicated in the comments of the answer from Sunit, you will need to remove the attribute repositoryFactoryBeanClass, it could not longer take the value EnversRevisionRepositoryFactoryBean.

auditreader list all revisions

Please, first, remove the spring-data-envers dependency, unless you are querying your audit tables you do not need it. * NOTE: An API to fetch the audit related historical data to be fetched from the table.I think your problem could be related with the different dependencies in your pom.xml. Specifically, the code shows you how to use Hibernate AuditReader find(Class cls, Object primaryKey, Number revision) The following code shows how to use AuditReader from. IllegalArgumentException - If cls or primaryKey is null or revision is less or equal to 0.NotAuditedException - When entities of the given class are not audited.IllegalStateException - If the associated entity manager is closed.The method find() throws the following exceptions: The method find() returns The found entity instance at the given revision (its properties may be partially filled if not all properties are audited) or null, if an entity with that id didn't exist at that revision. Number revision - Revision in which to get the entity.Object primaryKey - Primary key of the entity.The method find() has the following parameter: Copy T find( Class cls, Object primaryKey, Number revision) throws IllegalArgumentException, NotAuditedException, IllegalStateException







Auditreader list all revisions