How do I add multiple joins (Fetches) to a joined table using nhibernate and LINQ ?
- by ooo
i have these tables /entities
VacationRequestDate table which has a VacationRequestId field that links with VacationRequest table
VacationRequest has PersonId and RequestStatusId fields that links with Person and RequestStatus respectively.
i have this query so far:
IEnumerable<VacationRequestDate> dates = Session.Query<VacationRequestDate>().Fetch(r => r.VacationRequest).ThenFetch(p=>p.RequestStatus).ToList();
this works fine and joins with VacationRequest and then VacationRequest joins with RequestStatus but i can't figure out how to add an additional EAGER join to the VacationRequest table.
If i add a Fetch at the end, it refers to the VacationRequestDate table
If i add a ThenFetch at the end, it refers to the RequestStatus table
I can't find any api that will refer to the VacationRequest table as the reference point.
how would you add multiple joins to a joined table using nhibernate LINQ ?