-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Labels:None
Description
Description:
Adds the ability to specify a pipeline to the findAndModify update parameter.
Engineering Ticket Description:
The new syntax will look like this:
{ findAndModify: <collection-name>, query: <document>, sort: <document>, remove: <boolean>, update: <document OR pipeline>, new: <boolean>, fields: <document>, upsert: <boolean>, bypassDocumentValidation: <boolean>, writeConcern: <document>, collation: <document>, arrayFilters: <array> }The only supported stages in a pipeline will be single-document transformations: $addFields, $project, and $replaceRoot. For this ticket, we will not support options such as collation, bypassDocumentValidation, upsert, sort, and fields. Those options will be tracked by separate work items. We will never support arrayFilters in the pipeline-style update.
*note* : per DOCS-12724 – it is available with*OUT* feature flag.
Scope of changes
- findAndModify command and helper
- findOneAndUpdate helper
Impact to Other Docs
MVP (Work and Date)
Resources (Scope or Design Docs, Invision, etc.)
- documents
-
SERVER-40397 Add the ability to specify a pipeline to the findAndModify command
- Closed
- is related to
-
DOCS-12675 Docs for SERVER-40429: Add $merge stage to write output to existing collection
- Closed