Hi, I'm attempting to use NHibernate.Linq to return objects deep from my object graph, and for some reason NHibernate is returning the root object. I don't know if I'm missing something, or if it is just a problem with NHibernate.Linq.
The compiler correctly infers that I am trying to return an object of type FacilityInstruction when I use the following code, but at runtime, NHibernate is returning an object of type EesReferral. If anybody has any suggestions, I'd greatly appreciate it.
var facilityInstructions = from eesReferrals in session.Linq<EesReferral>()
where eesReferrals.ID == referralId.Request
select eesReferrals.Contract.ClientFacility.FacilityInstructions;
The same linq statement executes correctly and returns the correct result when run against an IEnumerable of EesReferral
Thanks for any info you can provide.