If I don’t set setFirstResult(-) and recursively call criteria.setmaxresults(10) each time, will it automatically grab the next 10 items from the database?
If I don’t set setFirstResult(-) and recursively call criteria.setmaxresults(10) each time, will it automatically
Share
No. You have to use
criteria.setFirstResult(0)and page through yourself, something like this: