-->
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: Limiting Returned Objects
PostPosted: Thu Feb 09, 2006 6:07 am 
Regular
Regular

Joined: Fri Nov 04, 2005 12:37 pm
Posts: 81
I was wondering if there was a way of limiting what is returned by nHibernate.

Let me explain....... in my current system I am using NHibernate and in this system I have a User Entity which contains a Fair entity and each Fair entity has many Stand entities and each stand has a Forum entity ant each forum has many Post entity.


So the act of me getting a User object from NHibernate results in me bringing back an awful lot of other objects.......and some of the time this is necessary as the system needs this information...but when it doesn’t it means an awful lot on info is being stored in memory.

Is there anyway around this?


From my time developing with java and Hibernate......i know you can use Spring and dynaclasses for this.....is there anything like this for C#.net and Nhibernate.


Top
 Profile  
 
 Post subject: Lazy Loading
PostPosted: Thu Feb 09, 2006 6:14 am 
Regular
Regular

Joined: Tue Jan 03, 2006 7:21 am
Posts: 85
Will implementing Lazy Loading in your case be helpful.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 16, 2006 11:46 am 
Regular
Regular

Joined: Fri Nov 04, 2005 12:37 pm
Posts: 81
No not really because lazy it more like a on/off solution....where as i might for example may one an object to be returned but only certain attributes from it. Or i might want different attributes in different situations


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.