Reputation: 28770
Is it possible to do a left join like this in Nhibernate:
SELECT T.title_id, T.title, S.qty
FROM titles T
LEFT JOIN sales S on
T.title_id = S.title_id
AND S.stor_id = '7131'
ORDER BY T.title
The important part to note is the extra clause (AND S.stor_id = '7131')
in the LEFT JOIN expression.
Can I do this in Nhibernate hql or is there another way?
Upvotes: 1
Views: 2011
Reputation: 28770
The answer is the with keyword, for example:
Select q FROM GeneralQuestion
q Left Join q.QuestionResponses as qr with
qr.ContactUid = :contactuid WHERE q.ParentUid = :audituid
Upvotes: 2