-->
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.  [ 2 posts ] 
Author Message
 Post subject: Resolution of lazy property fails with NPE for sql-query
PostPosted: Tue Oct 17, 2006 3:27 pm 
Newbie

Joined: Fri Jan 28, 2005 11:07 am
Posts: 6
With Hibernate 3.1, I defined a property as lazily resolved and performed the requisite instrumentation via the Ant InstrumentTask task. While the lazy resolution behaved correctly for objects that I resolved via Session.get(), it did not behave correctly for objects I resolved via Query.list(); cglib failed with a NullPointerException when the proxy attempted to resolve the lazily-loaded property. On a related note, probably, I noticed that Session.get() returned an instance of the target class that referenced the proxy implementation, while Query.list() returns a proxy implementation proper. Please advise.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 18, 2006 10:46 am 
Newbie

Joined: Fri Jan 28, 2005 11:07 am
Posts: 6
Actually, the problem is broader than I described: any instance of a class for which you've declared a lazily resolved property and that you've instrumented behaves incorrectly unless you resolve instances of the class with a direct read (e.g., Session.get()). Specifically, while I battled with queries yesterday, it became apparent that instances of the instrumented class behave similarly when those instances are resolved as instance variables in referring classes.


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