-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
-
Documentation (Ref Guide, User Guide, etc.)
The syntax is similar to JPQL: DELETE FROM entityName [WHERE condition].
A single entity name can be referenced (no joins of any kind). The WHERE condition is optional. Projections (aka SELECT), grouping, aggregations (AVG, MAX, ... functions) and ORDER BY are not allowed.
A DELETE statement can be executed using the newly added Query.executeStatement, which will return the number of deleted entities, an int.
Alternatively, a DELETE statement can also be executed via the usual Query.execute method and the returned QueryResult will have a hitCount equal to the number of deleted entities but no actual results (QueryResult.list() will return an empty list).
- documents
-
ISPN-12642 Delete by query
- Closed
- is incorporated by
-
JDG-4910 Delete by query
- Closed