[DS-2764] CollectionDAOImpl - Parameters Switched

This commit is contained in:
KevinVdV
2015-09-23 12:25:56 +02:00
parent 50d4df6c85
commit 07eb4cc019

View File

@@ -58,12 +58,12 @@ public class CollectionDAOImpl extends AbstractHibernateDSODAO<Collection> imple
addMetadataSortQuery(query, Arrays.asList(order), null);
Query hibernateQuery = createQuery(context, query.toString());
if(limit != null)
if(offset != null)
{
hibernateQuery.setFirstResult(limit);
hibernateQuery.setFirstResult(offset);
}
if(offset != null){
hibernateQuery.setMaxResults(offset);
if(limit != null){
hibernateQuery.setMaxResults(limit);
}
hibernateQuery.setParameter(order.toString(), order.getFieldID());
return list(hibernateQuery);