views:

144

answers:

1

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 this is certain or exist other way to do this?

PD: please excuse my bad english.

+1  A: 

Current implementation of Linq provider is based on CriteriaApi and that why it can create only simple queries

Sly