Hi,
I have an application wherein I am showing 7 results/page in UI. For this I am using the following hibernate command:
query.setFirstResult(pageOffset).setMaxResults(pageSize).list()
where pageOffset is the index for rownums and pagesize is 7.
The issue I am facing is:- for the pages its displaying after the first page, all the other pages have some duplicate entry present which was already there in the previous page. e.g. if there are in total 10 entries in the DB..then for the 1st page it picks the first 7 rownums...when you click on the 2nd page in UI...the query runs for the next 7 records but this picks up some entries which are already there in the first page results..thereby missing some records.
The issue is not occurring when I am using 4 results per page. This is definitely a hibernate pagination issue.
I need some expert advise. Please help.
Thanks Dchamp
|