-->
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: [performance] Get Nth entry from resultset?
PostPosted: Tue Sep 07, 2004 4:44 am 
Senior
Senior

Joined: Tue Mar 02, 2004 6:17 pm
Posts: 151
Hi,

I'd like to get the Nth entry from a resultset without actually retrieving the entire resultset. This is equivilent to "limit N, 1" under MySQL. How does one do the same thing under Hibernate? I've been unable to find mention of this in the docs.

Thank you,
Gili


Top
 Profile  
 
 Post subject: Re: [performance] Get Nth entry from resultset?
PostPosted: Tue Sep 07, 2004 4:47 am 
Senior
Senior

Joined: Tue Mar 02, 2004 6:17 pm
Posts: 151
cowwoc wrote:
Hi,

I'd like to get the Nth entry from a resultset without actually retrieving the entire resultset. This is equivilent to "limit N, 1" under MySQL. How does one do the same thing under Hibernate? I've been unable to find mention of this in the docs.

Thank you,
Gili


I believe I just found it. Is it Query.setFirstResult()?

Thanks,
Gili


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.