Grails

Criteria Query and pagination params

I have been using the following code to get paginated result and the total number of results returned irrespective of the pagination params. def result=SampleDomain.createCriteria().list(){ // multiple restrictions maxResults(params.max) firstResult(params.offset) } // Return type is ArrayList Integer ...

by Bhagwat Kumar
Tag: GORM count()
14-Jul-2010