0
我试图在子查询中用case语句编写一个hql查询。子查询中的HQL case语句
select zr
from ZipResource zr
inner join zr.zipInflows zi
inner join zi.toInstInflows tii
inner join tii.toInstance ti
where ti.state = 'COMPLETED'
and
ti.completedDate between :dateFrom and
:dateTill
and (
case when :units is not null then
(ti.toPrototype.unit in :units) end)
order by tii.zipInflow.zipResource.name
这样做是真的吗?在这个查询中,我在case语句中得到了QuerySyntaxException。 任何人都可以解释我做错了什么吗?