Hibernate version: 2
I am trying to write a HQL query with an inner query. It works fine until I try with a cross join, like this:
... WHERE o1.prop1 IN (SELECT c1.prop2 FROM Class1 c1, Class2 c2 WHERE ...)
or an inner query inside my first inner query, like this:
... WHERE o1.prop1 IN (SELECT c1.prop2 FROM Class1 c1 WHERE c1.prop3 IN (SELECT c2.prop4 FROM Class2 c2 WHERE ...))
But I'll get a parse exception :(
In both cases it does not seem to resolve the second classname and the message is (for example)
in expected: c2 [select ... from my.package.Class0 as o1 where o1.prop1 in (select c1.prop2 from my.package.Class1 c1 where c1.prop3 in (select c2.prop4 from Class2 c2))]
So... any suggestions please? Is it not supported with this kind of query?
|