Hibernate Books

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: Lazy Loading
PostPosted: Thu May 12, 2005 8:51 pm 
Newbie

Joined: Wed May 11, 2005 6:14 pm
Posts: 10
I have been trying to research this with little success... is it acceptable to lazy load stuff pretty much whenever possible? Is there some drawback to using lazy loading for the majority of relationships other than making the app a little more chatty?

Anybody have any links or opinions about where lazy loading is appropriate?


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 13, 2005 2:41 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Java Hibernate people recommend using lazy-loading by default. In Hibernate 3.0 it's the default setting now if lazy="..." isn't specified.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 13, 2005 10:13 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
Lazy loading is used to avoid loading linked data (<many-to-one> or <one-to-many>) when loading an entity; the linked data will be loaded at the first use (if the session is still open).

So you should use lazy load when you know that you can use an entity without its linked data.

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


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.