-->
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: Disable lazy-load in configuration file
PostPosted: Tue Oct 23, 2007 2:29 pm 
Newbie

Joined: Mon Jun 20, 2005 11:38 am
Posts: 7
Hibernate version: 3.X

Hi,

Why is not possible to override annotation lazy-load configuration at the high hibernate level of configuration.

The probleme is sometime in old coded application we need to mock some very complexe object without business (like domains values ;)).

For this the more quick approch is to serialize/unserialize object. For this we can use xstream but xstream can't serialize proxy created by CGLIB :

cf : http://jira.codehaus.org/browse/XSTR-359

So it will be interesting to be able to disable lazy-load feature for improve facility of test. I read the documentation without see any information on it.
In hibernate 2 if my memory is good it was possible. Why this features was removed in hibernate 3.X

Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 24, 2007 5:25 am 
Regular
Regular

Joined: Mon Jan 22, 2007 10:32 am
Posts: 101
I believe till 2.0 you need to explicitly mention the lazy attribute in associations if you want them to be lazy but 3.0 onwards everything is lazy by default and you need to override the default behavior by setting lazy="false" in required associations.

No idea if it is possible to set the lazy settings globally.

_________________
Please rate this post if you find it helpful


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.