Details
-
Task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Currently there is no way to use subqueries in SelectQuery or ObjectSelect.
So we need a way to do so in Expression API.
Simple version can be implemented like this:
ObjectSelect<Painting> subquery = ObjectSelect.query(...);
long count = ObjectSelect.query(Artist.class)
.where(ExpressionFactory.exists(subquery))
.selectCount(context);
Also we need a way to use expressions from top level query in a subquery. Maybe it can be new expression (like Artist.ARTIST_NAME.enclosing())
In a first iteration this should support EXISTS and IN subqueries.
Attachments
Issue Links
- requires
-
CAY-2465 New SelectTranslator implementation
-
- Closed
-