-->
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.  [ 7 posts ] 
Author Message
 Post subject: Paginate child
PostPosted: Fri Dec 05, 2003 5:59 am 
Beginner
Beginner

Joined: Tue Oct 28, 2003 6:43 am
Posts: 33
I have a parent-child relation and i have too many childs in my SET for one only page. So I want to paginate them, I can i do this?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 05, 2003 6:05 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Collection filter. This is covered in the doco.


Top
 Profile  
 
 Post subject: Paginate then
PostPosted: Fri Dec 05, 2003 6:48 am 
Beginner
Beginner

Joined: Tue Oct 28, 2003 6:43 am
Posts: 33
I want to paginate them, setfirstelemnt, setmaxelement, not filter them!
Can I do that?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 05, 2003 6:50 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
yes.


Top
 Profile  
 
 Post subject: How can I do that?
PostPosted: Fri Dec 05, 2003 6:57 am 
Beginner
Beginner

Joined: Tue Oct 28, 2003 6:43 am
Posts: 33
How can I do that?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 05, 2003 7:24 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Only by explicit Query (I don't know other way to setmaxelement...

An other option is to lazy your collection and set the collection batch-size attribute. I've never played with that so I'm not sure of me.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 05, 2003 7:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
As per the doco and FAQ:

session.createFilter( foo.getBars(), "").setMaxResults(50).list()


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.