Fetch strategy http://nhforge.org/doc/nh/en/index.html#performance-fetching
James 2009/4/2 Fethi Gürcan <[email protected]> > Hello, > > I have entities with parent-child hierarchy, > > yes, i can set lazy=true , lazy=false for setting behaviour of loading > children. > > So, i need to pass data to client-side via WCF. > > As you know, when i marked child-relation as [DataMember] like the other > properties. > The WCF will serialize the whole properties that marked as [DataMember]. > Serialization process calls the all properties so the properties will be > loaded. And that does not differs lazy=true or lazy=false. > > Actually i'll use Entity classes for two different cases > > 1) Internal use in business layer. (there is no problem here) > 2) Passing data to client-side. (I'll use DTOs in some cases but not > everytime) > > In the case 2, there ares some simple scenarios; > > a) When i get the whole record in a table, i don't want to pass the > children. > b) When i get the single record. I want to get the children. > (Actually, all child have a relation to parent. i dont need to pass that > also) > > Is there any way to tell NHibernate (in runtime) to do load children or do > not? > > Thanks. > -- > Fethi Gürcan > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
