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

Undo 4.2 changes to $out

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.1.14
    • Aggregation Framework
    • None
    • Fully Compatible
    • Query 2019-05-06, Query 2019-05-20, Query 2019-06-03, Query 2019-06-17

    Description

      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"
      }}

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: