How do I count the total records using Projections?


The example below show how to get total row count using the Projections.rowCount(). The result of this query will be a single object of Integer that contains the result of executing an SQL select count (*) command.

Filed in: Hibernate Core
© 2014 Java Examples - Built with love by Wayan Saryada.