File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -72,8 +72,8 @@ Definition
7272 Starting in MongoDB 4.0.12+ (and 3.6.14+ and 3.4.23+), the operation errors if the query argument
7373 is not a document.
7474
75+ If no document matches the ``filter``, no document is updated.
7576
76-
7777 * - ``update``
7878
7979 - document
@@ -157,16 +157,10 @@ Definition
157157 modify for an update operation on an array field.
158158
159159 .. include:: /includes/extracts/arrayFilters-details.rst
160-
161-
160+
162161 For examples, see :ref:`findOneAndUpdate-arrayFilters`.
163162
164163 .. versionadded:: 3.6
165-
166-
167-
168-
169-
170164
171165 :returns:
172166
@@ -180,7 +174,9 @@ Document Match
180174~~~~~~~~~~~~~~
181175
182176:method:`db.collection.findOneAndUpdate()` updates the first matching
183- document in the collection that matches the ``filter``.
177+ document in the collection that matches the ``filter``. If no document
178+ matches the ``filter``, no document is updated.
179+
184180The ``sort`` parameter can be used to influence which document is updated.
185181
186182Projection
You can’t perform that action at this time.
0 commit comments