-->
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: problem with paging
PostPosted: Tue Oct 04, 2005 10:13 am 
Newbie

Joined: Wed Aug 10, 2005 3:32 pm
Posts: 2
Hibernate: 3.0.5
database: mysql Ver 14.7

I think that my problem would be one that others have had, but I can not find any examples similar to my problem. I am trying to use the Criteria setFirstResult and setMaxResults to implement paging. For the examples that I have found they keep track of the page count and times it by the max results to get the starting location, what happens if in the middle the user in the GUI changes the max result count? Now your page count means nothing. I have no standard ID attribute that I can use as a key for the first result since they have ordered the table by a name attribute. I can not use the scrollable result because the server does not keep state from the GUI since there can be multiple ones attached and communicating at the same time. I am trying to not get all entries in the table because it can get very large over time. What I am trying to do is given an object find the row location it has after the ordering has been applied and use this location as my first result. Is there a way to do this other then get the full table and look through it? There must be a easier and better way.

Any and all ideas are appreciated.


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.