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

Undo 4.2 changes to $out

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.14
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • Fully Compatible
    • Query 2019-05-06, Query 2019-05-20, Query 2019-06-03, Query 2019-06-17

      Remove any special kind of $out stage, translate existing tests to use $merge:

      Written as   Translates to
      {$out: {
        to: "x",
        uniqueKey: {x_id: 1},
        mode: "insertDocuments"
      }}
      {$merge: {
        into: "x",
        on: "x_id"
        whenMatched: "fail",
        whenNotMatched: "insert"
      }}
      {$out: {
        to: "x",
        uniqueKey: {x_id: 1},
        mode: "replaceDocuments"
      }}
      {$merge: {
        into: "x",
        on: "x_id",
        whenMatched: "replaceWithNew",
        whenNotMatched: "insert"
      }}

            Assignee:
            anton.korshunov@mongodb.com Anton Korshunov
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: