diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2019-05-08 17:48:42 -0400 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2019-05-15 12:17:39 -0400 |
commit | dfedea7a2ab7de40f984210fa8381664cbe37be9 (patch) | |
tree | dfd2749c853bdbde9b019540b6f4aeb988c82a85 /jstests/change_streams | |
parent | 30c603ed5efc62a97b42419a92b1210e14932361 (diff) | |
download | mongo-dfedea7a2ab7de40f984210fa8381664cbe37be9.tar.gz |
SERVER-40239 New alias: $replaceWith => $replaceRoot
Diffstat (limited to 'jstests/change_streams')
-rw-r--r-- | jstests/change_streams/pipeline_cannot_modify_id_field.js | 2 | ||||
-rw-r--r-- | jstests/change_streams/whitelist.js | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/jstests/change_streams/pipeline_cannot_modify_id_field.js b/jstests/change_streams/pipeline_cannot_modify_id_field.js index 815dad648ae..d43e1ff28a4 100644 --- a/jstests/change_streams/pipeline_cannot_modify_id_field.js +++ b/jstests/change_streams/pipeline_cannot_modify_id_field.js @@ -60,6 +60,7 @@ {$set: {_id: "$newId"}} ], {$replaceRoot: {newRoot: {otherField: "$_id"}}}, + {$replaceWith: {otherField: "$_id"}}, {$redact: {$cond: {if: {$gt: ["$_id", {}]}, then: "$$DESCEND", else: "$$PRUNE"}}} // _id:0 ]; @@ -91,6 +92,7 @@ {$set: {_id: "$newId"}} ], {$replaceRoot: {newRoot: {_id: "$_id"}}}, + {$replaceWith: {_id: "$_id"}}, { $redact: { $cond: { diff --git a/jstests/change_streams/whitelist.js b/jstests/change_streams/whitelist.js index 16b6ca93145..6b86604f8a8 100644 --- a/jstests/change_streams/whitelist.js +++ b/jstests/change_streams/whitelist.js @@ -20,6 +20,7 @@ {$addFields: {newField: 1}}, {$set: {newField: 1}}, {$replaceRoot: {newRoot: {_id: "$_id"}}}, + {$replaceWith: {_id: "$_id"}}, {$redact: "$$DESCEND"} ]; |