HHH-5891: Added ordering clause to query generated by getRevisions() to fulfill guarantee given in JavaDoc.

This commit is contained in:
Michael Rudolf 2012-01-04 17:06:26 +01:00
parent 40c61775df
commit 875a4b29dd
1 changed files with 1 additions and 0 deletions

View File

@ -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();
} }