.CreateCriteria<Core.Domain.Application>()
.SetFetchMode<Core.Domain.Application>(app => app.ApplicationWorkflows,
FetchMode.Eager)
.SetFetchMode<Core.Domain.Application>(app =>
app.ApplicationWorkflows[0].ApplicationStatus, FetchMode.Eager)
.Add(SqlExpression.In<Core.Domain.Application>(app =>...
Also remember to consider performance:
http://nhforge.org/blogs/nhibernate/archive/2008/09/06/eager-loading-aggregate-with-many-child-collections.aspx
--------------------------------------------------
From: "Mike" <cole...@gmail.com>
Sent: Tuesday, July 06, 2010 7:46 PM
To: "nhusers" <nhu...@googlegroups.com>
Subject: [nhusers] Setting FetchMode on a grandchild object
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to nhu...@googlegroups.com.
> To unsubscribe from this group, send email to
> nhusers+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>
.CreateCriteria<Core.Domain.Application>()
.SetFetchMode("ApplicationWorkflows" ,FetchMode.Eager)
.SetFetchMode("ApplicationWorkflows.ApplicationStatus",
FetchMode.Eager)
...
--------------------------------------------------
From: "Mike" <cole...@gmail.com>
Sent: Monday, August 30, 2010 4:46 PM
To: "nhusers" <nhu...@googlegroups.com>
Subject: [nhusers] Re: Setting FetchMode on a grandchild object