-->
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: Pagination & Hibernate 2.1
PostPosted: Thu May 06, 2004 6:06 pm 
Regular
Regular

Joined: Wed May 05, 2004 3:41 pm
Posts: 118
Location: New Jersey,USA
If I want to implement Pagination(search results spanning multiple pages like Goooooogle.." in my Web-tier for the search results, would hibernate provide any easy way to do this.

I saw setFirstResult() method in the documentation and was wondering if thiw was for pagination to return a subset of the queries?

How does this work in case of "lazy" initialization model where the entities are not created?

-anand


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 07, 2004 1:38 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
As you have found the query class has the setFirstResult and the Max partner. This allows you to create a paging dataset when you execute the query. How it talks to the database (the SQL generated) is dependent on the dialect. Not sure what you mean in relation to lazy objects. Its the same with Load or standard find etc you get the objects you have requested in the HQL query if any relationships are lazy then they will not be loaded. I suggest you just try it.


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.