HHH-5891: Added ordering clause to query generated by getRevisions() to fulfill guarantee given in JavaDoc.
This commit is contained in:
parent
40c61775df
commit
875a4b29dd
|
@ -151,6 +151,7 @@ public class AuditReaderImpl implements AuditReaderImplementor {
|
||||||
|
|
||||||
return createQuery().forRevisionsOfEntity(cls, entityName, false, true)
|
return createQuery().forRevisionsOfEntity(cls, entityName, false, true)
|
||||||
.addProjection(AuditEntity.revisionNumber())
|
.addProjection(AuditEntity.revisionNumber())
|
||||||
|
.addOrder(AuditEntity.revisionNumber().asc())
|
||||||
.add(AuditEntity.id().eq(primaryKey))
|
.add(AuditEntity.id().eq(primaryKey))
|
||||||
.getResultList();
|
.getResultList();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue