DATAMONGO-1870 - Consider skip/limit on MongoOperations.remove(Query, Class).
We now use _id lookup for remove operations that query with limit or skip parameters. This allows more fine grained control over documents removed.
Original pull request: #531.
Related pull request: #532.
pull/553/head
Christoph Strobl8 years agocommitted byMark Paluch
@ -124,7 +124,7 @@ public class MongoTemplateUnitTests extends MongoOperationsUnitTests {
@@ -124,7 +124,7 @@ public class MongoTemplateUnitTests extends MongoOperationsUnitTests {
You can use several overloaded methods to remove an object from the database.
* *remove* Remove the given document based on one of the following: a specific object instance, a query document criteria combined with a class or a query document criteria combined with a specific collection name.
<1> Remove a single entity via its `id` from the associated collection.
<2> Remove all documents matching the criteria of the query from the `GOT` collection.
<3> Rewmove the first 3 documents in the `GOT` collection. Unlike <2> the documents to remove are identified via their `id` using the given query applying `sort`, `limit` and `skip` options and then removed all at once in a seperate step.
<4> Remove all documents matching the criteria of the query from the `GOT` collection. Unlike <3> documents do not get deleted in a batch but one by one.
<5> Remove the first 3 documents in the `GOT` collection. Unlike <3> documents do not get deleted in a batch but one by one.