Bug 13075: To get last alert, use offset 0 instead of 1

Status 13075: resolved fixed
Reviewed-By: Nitin
This commit is contained in:
kishan 2012-01-17 12:03:30 +05:30
parent 44d796fd91
commit 68ace71ca8
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ import com.cloud.utils.db.SearchCriteria;
public class AlertDaoImpl extends GenericDaoBase<AlertVO, Long> implements AlertDao {
@Override
public AlertVO getLastAlert(short type, long dataCenterId, Long podId) {
Filter searchFilter = new Filter(AlertVO.class, "createdDate", Boolean.FALSE, Long.valueOf(1), Long.valueOf(1));
Filter searchFilter = new Filter(AlertVO.class, "createdDate", Boolean.FALSE, Long.valueOf(0), Long.valueOf(1));
SearchCriteria<AlertVO> sc = createSearchCriteria();
sc.addAnd("type", SearchCriteria.Op.EQ, Short.valueOf(type));