【发布时间】:2011-07-06 22:01:47
【问题描述】:
我需要使用HQL对象构造函数,例如:
select new SomeClass(i.Id, i.Name) from Item i...
但我也需要使用 distinct 关键字,因为查询中还有更下方的连接,例如:
select distinct i.Id from Item i
我试过这个:但它只会导致 Antlr 异常,所以我认为它是无效的语法:
select new SomeClass(distinct i.Id, i.Name) from Item i
这可能吗?
【问题讨论】:
标签: nhibernate hql