CLOUDSTACK-2625, CLOUDSTACK-3401: Usage records are ordered by start_date which is not unique. While listing large datasets or when page size is small this will result in duplicates. Order records by id instead

This commit is contained in:
Kishan Kavala 2014-10-09 10:27:35 +05:30
parent 59e1e9bbd5
commit 63109a97b1
1 changed files with 1 additions and 1 deletions

View File

@ -232,7 +232,7 @@ public class UsageServiceImpl extends ManagerBase implements UsageService, Manag
", using pageSize: " + cmd.getPageSizeVal() + " and startIndex: " + cmd.getStartIndex());
}
Filter usageFilter = new Filter(UsageVO.class, "startDate", false, cmd.getStartIndex(), cmd.getPageSizeVal());
Filter usageFilter = new Filter(UsageVO.class, "id", true, cmd.getStartIndex(), cmd.getPageSizeVal());
SearchCriteria<UsageVO> sc = _usageDao.createSearchCriteria();