-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate Giving Duplicate Entries for the last page
PostPosted: Thu Sep 06, 2012 6:31 am 
Newbie

Joined: Thu Sep 06, 2012 6:17 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.