java - Pagination with Hibernate Criteria -


i facing problem in pagination. using criteria. display length 10. while clicking pagination shows different results list 9 , 8 that. how avoid kind of pagination problems. need list 10 every time. how control kind of inconsistancy.

user setfirstresult() , setmaxresults() this. here short code example:

entitymanager em = ..... .................... typedquery<t> query = em.createquery(criteria); query.setfirstresult(pagenumber * pagesize); query.setmaxresults(pagesize); 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -