.add(AuditEntity.relatedId("reference").eq(id3))
.getResultList());
Set rev1 = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 1)
.add(AuditEntity.property("reference").eq(new SetRefEdEmbIdEntity(id3, null)))
.getResultList());
Set rev2_related = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 2)
.add(AuditEntity.relatedId("reference").eq(id3))
.getResultList());
Set rev2 = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 2)
.add(AuditEntity.property("reference").eq(new SetRefEdEmbIdEntity(id3, null)))
.getResultList());
Set rev3_related = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 3)
.add(AuditEntity.relatedId("reference").eq(id3))
.getResultList());
Set rev3 = new HashSet(getAuditReader().createQuery()
.forEntitiesAtRevision(SetRefIngEmbIdEntity.class, 3)
.add(AuditEntity.property("reference").eq(new SetRefEdEmbIdEntity(id3, null)))
.getResultList());
assert rev1.equals(rev1_related);
assert rev2.equals(rev2_related);
assert rev3.equals(rev3_related);