Monday 2 July 2012

How to get count the number of query results without returning them in Hibernate


You can count the number of query results without returning them in Hibernate:


( (Integer) session.createQuery("select count(*) from ....").iterate().next() ).intValue()

No comments:

Post a Comment