# traverseRelationship Not yet implemented for revisions of entity queries entity

**URL:** <https://discourse.hibernate.org/t/traverserelationship-not-yet-implemented-for-revisions-of-entity-queries-entity/5510>\
**Category:** Hibernate ORM\
**Created:** [July 1, 2021, 12:15pm UTC](https://discourse.hibernate.org/t/traverserelationship-not-yet-implemented-for-revisions-of-entity-queries-entity/5510 "2021-07-01T12:15:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francesco](https://avatars.discourse-cdn.com/v4/letter/f/e47c2d/32.png) [@Francesco](https://discourse.hibernate.org/u/Francesco)\
**Post date:** [July 1, 2021, 12:15pm UTC](https://discourse.hibernate.org/t/traverserelationship-not-yet-implemented-for-revisions-of-entity-queries-entity/5510/1 "2021-07-01T12:15:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [July 1, 2021, 3:15pm UTC](https://discourse.hibernate.org/t/traverserelationship-not-yet-implemented-for-revisions-of-entity-queries-entity/5510/2 "2021-07-01T15:15:52Z")

</div>

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 e2.id = e.oldId`

---

<div class="post-metadata">

**Author:** ![Francesco](https://avatars.discourse-cdn.com/v4/letter/f/e47c2d/32.png) [@Francesco](https://discourse.hibernate.org/u/Francesco)\
**Post date:** [July 1, 2021, 3:24pm UTC](https://discourse.hibernate.org/t/traverserelationship-not-yet-implemented-for-revisions-of-entity-queries-entity/5510/3 "2021-07-01T15:24:44Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [July 2, 2021, 5:09am UTC](https://discourse.hibernate.org/t/traverserelationship-not-yet-implemented-for-revisions-of-entity-queries-entity/5510/4 "2021-07-02T05:09:57Z")

</div>

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(...)`
