I need to do the following SQL with QueryOver in NHibernate:
select *
from Post post
where post.User.Id = 1
or post.Level in (1, 2, 3)
or (select Id
from SubPost sub
where sub.Post = post
and sub.User.Id = 1) != null
I don’t now how I can do this with QueryOver. The problem for me is how I have to declare the subquery and how can I add it with an or condition. I hope, someone can give me a hint. Thank you.
Best Regards, Thomas
try this
i didn’t sure really about the second where which is after the JoinAlias, but try it