The filter to choose the document to replace.
The replacement document, which contains no _id
field.
Optional
upsertIf true, perform an insert if no documents match the filter.
If false, do not insert if no documents match the filter.
Defaults to false.
false
Represents a replaceOne operation that can be used in a bulk write operation.
Field
filter - The filter to choose the document to replace.
Field
replacement - The replacement document, which contains no
_id
field.Field
upsert - If true, perform an insert if no documents match the filter.