I want to load the list of users and their roles, with this query:
var q = from u in session.Linq<User>()
select new
{
u.Name,
u.Password,
Roles = from r in u.Roles
select new { r.Code, r.Name }
};
But this query is not working. Produce the following error: "The method 'Select' is not implemented."
¿The message suggest that NHibernate.Linq not support nested selects? I want to know if 开发者_如何学Gothis is certain or exist other way to do this?
PD: please excuse my bad english.
Current implementation of Linq provider is based on CriteriaApi and that why it can create only simple queries
精彩评论