File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
source/fundamentals/crud/write-operations Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,13 @@ Update documents use the following format:
9090See the MongoDB server manual for a :manual:`complete list of update operators
9191and descriptions </reference/operator/update-field/>`.
9292
93+ .. tip::
94+
95+ ``UpdateOne()`` updates the first document that matches the query filter
96+ you provide. To ensure that you update the correct document, you can use the ``sort``
97+ option to specify the order in which the operation finds documents. To learn more,
98+ see the `UpdateOneOptions <{+api+}/mongo/options#UpdateOneOptions>`__ API documentation.
99+
93100.. note:: Aggregation Pipelines in Update Operations
94101
95102 If you are using MongoDB Server version 4.2 or later, you can use aggregation
You can’t perform that action at this time.
0 commit comments