Hi. For our searching page, we are using Hibernate Criteria class to build the query at runtime. The result page should employ Hibernate pagination facilities. I have no problems running the query and getting the 50 record from the database, but how to get the whole number of matching records? Thanks.
posted 9 years ago
you have to use "Restrictions"
like: c.add( Restrictions.like( "firstName", "%" + filterValue + "%" )).setProjection(Projections.rowCount()) [ July 02, 2008: Message edited by: jim li ]