-->
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.  [ 3 posts ] 
Author Message
 Post subject: Retrieving a particular row without loading full list
PostPosted: Mon Apr 05, 2004 6:45 am 
Newbie

Joined: Mon Apr 05, 2004 6:37 am
Posts: 1
Hello.

I want to use an approach based on retrieving from a query only a row.
I see that when using session.find(), all I have to do is list.get(i) but I don't want to populate every element of the list.
I want the same behavior than iterate() but I don't want to retrieve only next object, but any object, identified by its index.

Any ideas?
Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 05, 2004 2:15 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 1:24 pm
Posts: 213
Location: Richardson, TX
how about Session.load() or (Query|Criteria).getUniqueResult()?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 05, 2004 2:16 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 1:24 pm
Posts: 213
Location: Richardson, TX
Sorry, that should be "uniqueResult()" instead of "getUniqueResult()"


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