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

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

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Fully Compatible

      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).

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

              Created:
              Updated:
              Resolved: