-->
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 disable default lazy loading in 1.2.0
PostPosted: Mon Nov 13, 2006 5:55 am 
Newbie

Joined: Thu Apr 27, 2006 6:03 am
Posts: 14
Hi,

I am using NHibernate 1.2.0Beta1.

Is it possible to disable lazy loading which is now default in 1.2.0 using the configuration properties within the app.config or at another single place?

Rob


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 13, 2006 7:20 am 
Beginner
Beginner

Joined: Sat Sep 09, 2006 5:55 am
Posts: 23
Adding default-lazy="false" to the hibernate-mapping element in all your mapping files should do the trick:

Code:
<hibernate-mapping
    xmlns="urn:nhibernate-mapping-2.0"
    default-lazy="false">
   <class ...
        </class>
</hibernate-mapping>

_________________
Cheers,

Guy Mahieu


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 13, 2006 9:48 am 
Newbie

Joined: Thu Apr 27, 2006 6:03 am
Posts: 14
Thank you, I know the way using default-lazy="false" in the mapping file to disable lazy loading. But this means to update our generator tool for the mappings and to regenerate all the mappings. So I am looking for a more simple possibility and I would prefer the way of handling this with the configuration properties.


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.