Merge pull request #242 from javaprog/HHH-5891

HHH-5891: Added ordering clause to query generated by getRevisions()
This commit is contained in:
Adam Warski 2012-01-05 08:15:07 -08:00
commit ab09c575e6
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)
.addProjection(AuditEntity.revisionNumber())
.addOrder(AuditEntity.revisionNumber().asc())
.add(AuditEntity.id().eq(primaryKey))
.getResultList();
}