Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions source/includes/extracts-4.2-changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -805,15 +805,14 @@ content: |

Starting in MongoDB 4.2,

- Replace document operations, such as
:method:`db.collection.replaceOne()` or :ref:`db.collection.update(
query, replacement, ... ) <update-behavior-replacement-document>`,
attempt to target a single shard, first by using the query filter. If the
operation cannot target a single shard by the query filter, it then
attempts to target by the replacement document.

In earlier versions, the operation attempts to target using the
replacement document.
- Operations which replace documents, such as
:method:`~db.collection.replaceOne()` or
:method:`~db.collection.update()` (when used with a replacement
document), will first attempt to target a single shard by using the
query filter. If the operation cannot target a single shard by the
query filter, it then attempts to target by the replacement
document. In earlier versions, these operations only attempt to
target using the replacement document.

- The :method:`~db.collection.save()` method is deprecated: use the
:method:`~db.collection.insertOne()` or
Expand Down