-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
Currently findAndModify operates over a single document. It would be a great improvement in funcionality if findAndModify operation had a flag to indicate the operation over multiple documents.
Whenever I need to implement a simple processing queue or similar use cases, I catch myself wishing findAndModify could operate over a multiple documents!
The current document parameter could have two additional two fields:
multi: <boolean>
limit: <number>
To call findAndModify multiple times is expensive, so work arounds must be created like the example described by Remon van Vliet in http://stackoverflow.com/questions/16334045/solution-to-bulk-findandmodify-in-mongodb
Regards!
- duplicates
-
SERVER-714 Allow findandmodify to retreive more than 1 record at a time
- Open