【发布时间】:2016-06-25 23:38:11
【问题描述】:
我可以像这样在 HQL 中选择 int 和 string 文字:
select 'a string' as StringLiteral, 1 as IntLiteral from Eg.MyClass
但我还没有找到选择布尔文字的方法。我尝试过select true ... 和select new bool true ...,但它们会导致 HQL 语法异常。
有没有办法在 HQL 中选择布尔文字?
我找到了解决方法 (select case when (1=1) then true...),但这似乎效率低下……
【问题讨论】:
标签: c# nhibernate hql nhibernate-4