0

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 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.