掲示板
service builder issue
hi
i use 6.1.1
an weard issue
the database is empty,
the correct result should be 0, but size of list is 1, and it will throw exception when i try log the 1.
now i use try-catch on it, but i want know how can i distinguish between it's due to no record in database and something wrong?
thank you
i use 6.1.1
an weard issue
dynamicQuery.add(RestrictionsFactoryUtil.between("createdDate", rangeStart.getTime(), rangeEnd.getTime()));
dynamicQuery.setProjection(ProjectionFactoryUtil.max("versionId"));
List<long> list = this.dynamicQuery(dynamicQuery);
if (list == null) {
LOGGER.debug("null");
} else {
LOGGER.debug("size:" + list.size());
for(Long key:list){
LOGGER.debug("to " + key);
}
}
</long>
the database is empty,
the correct result should be 0, but size of list is 1, and it will throw exception when i try log the 1.
now i use try-catch on it, but i want know how can i distinguish between it's due to no record in database and something wrong?
thank you