Base
<class name="A" >
<id name="ID" type="AnsiString">
<column name="p_ID_vc" length="50"></column>
<generator class="assigned"/>
</id>
<component name="B">
<many-to-one name="C" lazy="true"/>
</component>
<class/>
Goal
- Fetch C while Get the object A
- Fetch C while Get the List of A
Problem
I try ↓.but it doesn’t work.
Query.Fetch(A=>A.B).ThenFetch(B=>B.C).Where(……).
Help
- Anyone knows how to solve it.I need your help.Thank you!
Fetching over components doesn’t work with Linq queries yet. See this issue: https://nhibernate.jira.com/browse/NH-2769