-->
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: How to know which collection was not lazily initialized
PostPosted: Mon May 14, 2007 2:55 am 
Beginner
Beginner

Joined: Mon May 14, 2007 2:50 am
Posts: 22
Hi, i have unit tests which tell me i have not initialized one of collections.

The exception is expected, but i wonder how to know which collection did not initialize?

i get only these logs with debu value = ALL

ERROR [TestRunnerThread] (:0) - Failed to lazily initialize a collection - no session
NHibernate.LazyInitializationException: Failed to lazily initialize a collection - no session



is there a way to get the property, which tells which collection did not initialize?


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 14, 2007 3:24 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
You should be able to tell this from the exception stack trace.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 15, 2007 1:14 pm 
Expert
Expert

Joined: Fri Oct 28, 2005 5:38 pm
Posts: 390
Location: Cedarburg, WI
Can these exceptions that occur during lazy initialization specify the entity, property or collection that failed to initialize? We shouldn't have to dig through stack traces to try to determine this ...


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.