How to fetch total record count using Hibernate Criteria




Criteria criteria = getSession().createCriteria(getReferenceClass());

criteria.setProjection(Projections.projectionList().add(Projections.countDistinct("id"))

No comments:

Post a Comment