traverseRelationship Not yet implemented for revisions of entity queries entity

Hi, I am trying to use a forRevisionsOfEntity query to get all the revision of an entity in join with a condition in another entity, but it seems to me from the message " Not yet implemented for revisions of entity queries entity" that is not possible to use the traverseRelationship to use the join. I would like to know if there is some workaround.

You can use HQL directly to do the query. For every audited entity class, there is a corresponding dynamic entity with the _AUD name suffix containing all the audited properties. You could for example do select e.someAuditedProperty from MyEntity_AUD e join MyOtherEntity e2 on = e.oldId

1 Like

Thank you ! To do this i need also to create another modelEntity , for example , i have already Pagamento entity and corresponding repository so I need also to create the entity for Pagamento_Aud and repository?

No you don’t need to create entities, just stop using the Spring Data JPA repository query methods convention and use a proper HQL query with @Query(...)

1 Like