-->
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.  [ 5 posts ] 
Author Message
 Post subject: Iterate with close session
PostPosted: Wed Aug 18, 2004 10:11 am 
Beginner
Beginner

Joined: Wed Aug 18, 2004 10:03 am
Posts: 28
Problem

I have a problem with iterate query. In the application exists GUI layer and Domain Layer, Domain Layer make a query with iterate and return the iterator to the GUI layer, but before Domain Layer close the session. Then, when i iterate in the GUI layer, the program throw the next exception.
What is bad


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 18, 2004 10:16 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
try query.list() and then make an iterator

.iterate gets the ids and for each id, needs to connect the db (or the cache before the db), to get detailed result

also think about fetch the part of the graph you need

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 18, 2004 10:33 am 
Beginner
Beginner

Joined: Wed Aug 18, 2004 10:03 am
Posts: 28
Thanks for your quick reply !!!

If i use list(), the app lost performance


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 18, 2004 10:37 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
you don't lose nothing
.iterate() is more expensive than.list if you query uncache object

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 18, 2004 10:56 am 
Beginner
Beginner

Joined: Wed Aug 18, 2004 10:03 am
Posts: 28
Thank you a lot !!!

Regards
epsino


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