Hello,
I'm writing an HQL query, in the form of:
from a where ... or exists (from b inner join b.c where ...) and ...
I get back an entity of type a
from this query. However, I need to also know whether the exists
clause came back true or not later on in my code. If this was SQL, I'd tack it onto the select list. However, even if I add to the HQL select clause, so that it becomes:
select a, exists (from b inner join b.c where ...) as x from a where ... or x and ...
In my code I now have to choose between viewing untyped data, or viewing typed entities of type a
and throwing away my value x
that came back with it.
Is there a way to somehow get back typed data plus the extra column?