score:0

Accepted answer

Apologies. I was using QueryOver on the Get method in the Repository and Query for everything else. It works when I switched to Query.

score:1

What if you called .Expand() on your IQueryable first?

So, assuming you had a session, it might look like this:

var senders = 
    (from sender in session.Query<Sender>().Expand("User")
     where sender.User.Email == fromAddress
     select sender);

Unfortunately that requires you to import an NHibernate extension method.


Related Articles