#398 - ENH: Support delete using a Query instance

This commit is contained in:
Robin Bygrave
2015-08-29 00:58:47 +12:00
parent ccba5d08ef
commit 1c23720605
21 changed files with 407 additions and 24 deletions
+12
View File
@@ -743,6 +743,18 @@ public interface Query<T> extends Serializable {
*/
List<Version<T>> findVersionsBetween(Timestamp start, Timestamp end);
/**
* Execute as a delete query deleting the 'root level' beans that match the predicates
* in the query.
* <p>
* Note that if the query includes joins then the generated delete statement may not be
* optimal depending on the database platform.
* </p>
*
* @return the number of beans/rows that were deleted.
*/
int delete();
/**
* Return the count of entities this query should return.
* <p>