-->
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.  [ 1 post ] 
Author Message
 Post subject: LazyInitializationException - session was closed...
PostPosted: Thu Apr 28, 2005 4:43 am 
Regular
Regular

Joined: Fri Feb 25, 2005 3:02 am
Posts: 71
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

[b]Hibernate version:3.0[/b]

[b]Mapping documents:[/b]

[b]Code between sessionFactory.openSession() and session.close():[/b]

[b]Full stack trace of any exception that occurs:[/b]

[b]Name and version of the database you are using:postgresql 8.0[/b]

[b]The generated SQL (show_sql=true):[/b]

[b]Debug level Hibernate log excerpt:[/b]

Hi. I would like to have some more information concerning lazy="false" and outer-join = "true".

Firstly, I've explicitly specify lazy="false" in all my classes and when I tried to access a collection from a specific class, I got the LazyInitializationException error.... I've also explicitly set lazy="false" in all my one-to-many mappings, but I still got the same error. Why is this so?

Later I set outer-join = "true" in all my many-to-one mappings and now everythin works fine. I thought that specifying attribute lazy="false" is enough to obtain all the datas in my collection, but in my case it did not work.

Is there a conflict if a specify both i.e lazy="false" in classes and one-to-many mappings and outer-join = "true" in many-to-one mappings?

thanks in advance


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.