Thanks Mauricio - this should work. However I can't find this method - only CreateMultiQuery() exists.
Any suggestions? On 2 Cze, 01:07, Mauricio Scheffer <[email protected]> wrote: > CreateMultiCriteria > > http://www.nhforge.org/doc/nh/en/index.html#performance-multi-criteria > > On Jun 1, 7:25 pm, Cosmo <[email protected]> wrote: > > > Correct, but how can I achieve this by using DetachedCriteria? > > > On 1 Cze, 23:54, Christian Wuerdig <[email protected]> wrote: > > > > You probably want > > > this:http://ayende.com/Blog/archive/2007/06/20/Efficently-loading-deep-obj... > > > > -------- Original Message -------- > > > Subject: [AR] Detached Criteria - Eager Loading > > > From: Cosmo <[email protected]> > > > To: Castle Project Users <[email protected]> > > > Date: 6/2/2009 8:32 AM > > > > I have a class with two many-to-many associations. After reading the > > > > docs I realised that I'm allowed to get only one collection. So how is > > > > it possible to get all collections with eager loading? > > > > > So far... > > > > > DetachedCriteria dc = DetachedCriteria.For<File>(); > > > > dc.SetResultTransformer(new DistinctRootEntityResultTransformer()); > > > > dc.SetFetchMode("ComplaintCause", FetchMode.Eager); > > > > dc.SetFetchMode("InsuranceType", FetchMode.Eager); > > > > dc.SetFetchMode("Applicants", FetchMode.Eager); // MANY-TO-MANY > > > > > Now I would like to get another collection: > > > > dc.SetFetchMode("Insurers", FetchMode.Eager); // MANY-TO-MANY > > > > > But this gives me strange results. Is it possible to use a MultiQuery, > > > > or is there even a better way to go? > > > > > Thanks for your help in advance. > > > > Cosmo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
