Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-30976

Conditional Update/Insert Operation, Batched to a Find/Find-and-Modify Op

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • None
    • None
    • Querying
    • None
    • Fully Compatible

    Description

      Very often I find myself having to run a find (or find and modify) operation on one collection, check the result, and then conditionally push an update or insert to a different collection. Constantly requiring two round trips to the database.

      It would be incredible if you could batch these together. Execute a find or find-and-modify operation, then depending on a field or fields gathered, execute a secondary operation on a different (or the same) collection. Maybe even feed the find result into the secondary operation (but that would be asking a lot, haha).

      Attachments

        Issue Links

          Activity

            People

              asya.kamsky@mongodb.com Asya Kamsky
              vdog5@mac.com Victor Stewart
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: