findAndModify for multiple documents

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • 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!

              Assignee:
              Unassigned
              Reporter:
              Khalid Salomão
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: