-->
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.  [ 2 posts ] 
Author Message
 Post subject: What is the suggested way to Pagination On MYSQL
PostPosted: Sun Dec 06, 2009 3:06 am 
Newbie

Joined: Sun Dec 06, 2009 2:59 am
Posts: 2
Hi There,

Im a new user to hibernate. i have a situation where i need to implement pagination on on MYSQL. when i search the web for solution i have got 3 options. 1. using a Criteria query or using ScrollableResults or using the LIMIT in the query and then do a scroll() on the result. which option is a better way to do the pagination?

here, if i use the setFirstResult and setMaxResults would that be equivalent to using LIMIT option as in MYSQL?

Your help is very much appreciated.

Thank you,
bala.


Top
 Profile  
 
 Post subject: Re: What is the suggested way to Pagination On MYSQL
PostPosted: Sun Dec 06, 2009 10:04 pm 
Newbie

Joined: Wed Jul 30, 2008 1:03 am
Posts: 16
I believe the setFirstResult and setMaxResults are the dialect independent way the framework lets you do what you want to do. Otherwise you'll be tied to a given dialect.


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

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.