Is it possible to write JPQL query like following:
select count(*) > 0 from Scenario scen where scen.name = :name
that would return true/fals
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.
Yes, it is possible with following:
select case when (count(scen) > 0) then true else false end
from Scenario scen where scen.name = :name