JPQL statement returning boolean value

我们两清 提交于 2019-11-30 05:41:59

Yes, it is possible with following:

select case when (count(scen) > 0)  then true else false end  
from Scenario scen where scen.name = :name

What about just:

select count(scen) > 0
from Scenario scen where scen.name = :name

I was having the same problem, then I updated my hibernate to 4.3.11.Final and now it's working.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!