【发布时间】:2012-07-16 00:31:28
【问题描述】:
以下是特定类型类的 HQL 查询
select a from Animal a
where TYPE(a) in ('Cat', 'Dog')
and a.sex = 'Male'
order by a.name
select a from Animal a
where a.class in ('Cat', 'Dog')
and a.sex = 'Male'
order by a.name
我想知道是否有使用 QueryOver 的等价物?
【问题讨论】:
-
也许有,但与此同时你可以随时
.Where(Projections.eq("class", ...)
标签: nhibernate nhibernate-mapping hql queryover