Hi,
Im trying to use a case expression within the HQL and when I use a trivial "case when ... then ... end", it works ok, but as soon as i add the "else" part, it fails with unexpected AST node: query error. I've even tried with the latest hibernate jar, but of no use. Any ideas on how to fix this? The same works when used via SQLQuery.
FYI: Im using another select within the "else" condition.
ex: case when parent.name is not null
then parent.name
else
select child.name where child.parentId = parent.id
end
Any help is appreciated.
|