[SERVER-17256] findAndModify for multiple documents Created: 11/Feb/15 Updated: 10/Mar/17 Resolved: 20/May/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Khalid Salomão | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
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: 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! |
| Comments |
| Comment by J Rassi [ 20/May/15 ] |
|
Resolving as dup of SERVER-714. |
| Comment by Ramon Fernandez Marina [ 11/Feb/15 ] |
|
Thanks for your suggestion khalidsalomao. Marking the ticket as "Needs Triage" so the idea gets discussed internally. |