-
Type:
Task
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.2.M1
-
Component/s: Core Library, Database integration
-
Labels:None
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.
- requires
-
CAY-2465 New SelectTranslator implementation
-
- Closed
-