I'm using Hibernate 2.1 and am writing a query/filter interface for our app. I'm using the Criteria object and Expression factory to build the query programmatically.
There are a couple of places where I need to do subqueries, but I can't figure out how.
I'm trying to take an HQL query like this (which works great) and build it programmatically:
Code:
select from SpecialServicing ss where
ss.assetStatus in (
select elements(g.statuses) from StatusGroup as g where g.id in (11,12)
)
and ss.assetManager.id in ( 14)