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

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Backwards Compatibility:
      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

              Assignee:
              asya Asya Kamsky
              Reporter:
              victorstewart Victor Stewart
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: