-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate and cursors
PostPosted: Wed Apr 19, 2006 10:25 am 
Beginner
Beginner

Joined: Fri Jul 22, 2005 3:35 pm
Posts: 24
Location: Buenos Aires, Argentina
This is not a problem report. It's something that should be probaly said in the documentation.

I need to handle considerable amounts of data, and the docs aren't clear aboout when you are forcing a full load of the query results and when you are efficiently using a cursor.

Is using q.iterate() or q.scroll() the only way to use a cursor (i.e. avoid loading everything at once)? Are (can) cursors used qith q.list() or by the lazily associated collactions?

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 19, 2006 10:58 am 
Pro
Pro

Joined: Mon Jan 24, 2005 5:39 am
Posts: 216
Location: Germany
You can use cursor via query.scroll();
I am not sure about query.iterate().
You do NOT use a curser when using query.list();
Lazy Loading is a available for all the above methods.
You can use lazy loading with cursor or without.
Lazy Loading is a hibernate feature.
Cursors are a database feature.

Hope this helps.

_________________
dont forget to rate !


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 19, 2006 2:57 pm 
Beginner
Beginner

Joined: Fri Jul 22, 2005 3:35 pm
Posts: 24
Location: Buenos Aires, Argentina
steckemetz wrote:
You can use cursor via query.scroll();
I am not sure about query.iterate().
You do NOT use a curser when using query.list();
Lazy Loading is a available for all the above methods.
You can use lazy loading with cursor or without.
Lazy Loading is a hibernate feature.
Cursors are a database feature.

Hope this helps.


I know what lazy loading means...

So, the "<one-to-many/>" relationships can't be accessed with a cursor?

¿Only q.scroll()?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 20, 2006 3:12 am 
Pro
Pro

Joined: Mon Jan 24, 2005 5:39 am
Posts: 216
Location: Germany
Quote:
So, the "<one-to-many/>" relationships can't be accessed with a cursor?


I am certainly not an expert. But this should work with cursors too.

_________________
dont forget to rate !


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