Just an update: there is a "= 1" missing after the case end in the example query above and in the query inside the Main class in the test project. I uploaded the correct test case project (hql-test-fixed.zip) and the query above becomes:
select new Node(p.id, p.name, case when (select 1 from Product p2 where p2.fullPath like concat(p.fullPath, '%') and p2 <> p) = 1 then true else false end, false, true) from Product p
|