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: Query.scroll in version 2.1.6
PostPosted: Thu Aug 12, 2004 8:46 am 
Newbie

Joined: Thu Jul 08, 2004 7:16 am
Posts: 8
Hibernate version: 2.1.6

Hi everybody!

What is Query.scroll method good for? The ScrollableResults interface doesn't have a method for retrieving the whole persistent object, just an array of values. How do I construct the object from a particular row?

From what I read in the forum, it is an alternative to setFirstResult+setMaxResult, but what are the advantages/disadvantages of using one or the other?

Thanks for help.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 12, 2004 8:52 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Are you performing a scalar query? If not, the "whole persistent object" is already retreived for you as you scroll through the results. It's simply the first (and only) dimension in the array.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 12, 2004 9:10 am 
Newbie

Joined: Thu Jul 08, 2004 7:16 am
Posts: 8
Thanks steve, I didn't realize that. Now it's working.


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.