【发布时间】:2011-10-09 17:12:03
【问题描述】:
我需要在 NHibernate 中使用 QueryOver 执行以下 SQL:
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
我现在不知道如何使用 QueryOver 做到这一点。我的问题是我必须如何声明子查询以及如何使用or 条件添加它。我希望,有人可以给我一个提示。谢谢。
最好的问候,托马斯
【问题讨论】:
标签: c# nhibernate subquery queryover