-->
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: Lazy or not lazy
PostPosted: Tue Oct 11, 2005 8:17 am 
Newbie

Joined: Tue Oct 11, 2005 8:02 am
Posts: 6
I have entities with lazy load set to True. If I want to use collections on the client side (Windows Forms) there is a problem with session and lazy loading - I can't get any data from the collections.

OK, one solution is to use FetchMode.Eager on the server side and create custom Load method. I have another idea - I just have to copy my original entity (hbm.xml and class definition) and in this copy I set lazy load to False. It is not a lot of work to do and in the end you have two entities - one with lazy load of collections (used for lists etc.) and another "Big" entity withhout lazy loading, which is useful for rich Win Forms (which i.e. has some entity's basic data on one tab and some tabs with lists of entity's collections).

Do you think this approach is good or will I get into troubles?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 11, 2005 9:32 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
IMO, you should solve the problem you have with lazy loading in your windows application.

_________________
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.  [ 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.