i've write similar to yours.. 
http://groups.google.com/group/nhusers/browse_thread/thread/ae2fe6b3632ab00d

the solution of Stefan works but cause 2 join with Bs.. something like

**SQL**
select *
from ATable a
left join BTable b1 on a.id = b1.idA
left join DTable d on b1.id = d.idB
left join BTable b2 on a.id = b2.idA
left join ETable e on b2.id = e.idB

i don't find a solution to obtain a query with only 1 join with B like

select *
from ATable a
left join BTable b on a.id = b.idA
left join DTable d on b.id = d.idB
left join ETable e on b.id = e.idB

On 4 Nov, 10:48, Stefan Wenig <[email protected]> wrote:
> from memory, if the nameless ICollection<BClass> was named 'Bs':
>
> (from a in session.Query<AClass>()
>  ...
>  select a)
> .FetchMany(a => a.Bs).ThenFetch (b => b.D)
> .FetchMany(a => a.Bs).ThenFetch (b => b.E);
>
> On 3 Nov., 14:40, birchoff <[email protected]> wrote:
>
>
>
>
>
>
>
> > Given the following model
>
> > Class AClass{
> >     public virtual ICollection<BClass> {get; set;}
>
> > }
>
> > Class BClass{
> >     public virtual DClass D {get; set;}
> >     public virtual EClass E {get; set;}
>
> > }
>
> > class DClass {...}
>
> > class EClass {...}
>
> > How would I go about eager fetching the entire graph here using LINQ
> > and QueryOver in nh3

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

Reply via email to