[DRIVERS-658] New stage alias: $replaceWith Created: 15/May/19  Updated: 28/Oct/23  Resolved: 18/Jul/19

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Charlie Swanson Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-40239 New stage alias: $replaceWith Closed
depends on CSHARP-2624 New stage alias: $replaceWith Closed
depends on JAVA-3305 New stage alias: $replaceWith Closed
Server Compat: 4.1
Driver Compliance:
Key Status/Resolution FixVersion
JAVA-3305 Fixed 3.11.0
CSHARP-2624 Fixed 2.9.0
SWIFT-550 Done

 Description   

Add $replaceWith as a shortcut for {$replaceRoot: {newRoot: expression}}.



 Comments   
Comment by Githook User [ 07/Aug/19 ]

Author:

{'name': 'Ross Lawley', 'username': 'rozza', 'email': 'ross.lawley@gmail.com'}

Message: Added replaceWith helper to Aggregates

DRIVERS-658
Branch: master
https://github.com/mongodb/mongo-scala-driver/commit/239829568f2d415952a304364867a04bbb8912af

Comment by Bernie Hackett [ 30/May/19 ]

It does not affect Python.

Comment by Ian Whalen (Inactive) [ 30/May/19 ]

sgtm. behackett does this hit you as well? I thought your name came up as being relevant but apologies if this is just going to be under Jeff.

Comment by Jeffrey Yemin [ 29/May/19 ]

The usual suspects: Java and .NET

Comment by Ian Whalen (Inactive) [ 29/May/19 ]

sounds good! behackett jeff.yemin - which drivers does this impact?

Comment by Scott L'Hommedieu (Inactive) [ 28/May/19 ]

From the doc:

We added $replaceRoot in 3.4, but the syntax is more verbose than necessary. In order to ease adoption of the aggregation system as a means of updating documents, we will add a shortened $replaceWith stage as syntactic sugar over $replaceRoot

All drivers with an existing replaceRoot helper should add this replacewWith helper.

Comment by Ian Whalen (Inactive) [ 28/May/19 ]

scott.lhommedieu to talk to asya about why we did this and whether there needs to be builders in java and .net.

Generated at Thu Feb 08 08:22:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.