Skip to content

Commit 40bdafb

Browse files
committed
example code fixed
update() would change query type from TYPE_FIND_AND_UPDATE to TYPE_UPDATE
1 parent ba287a4 commit 40bdafb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

en/reference/find-and-update.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ For example you can update a job and return it:
3030
->sort('priority', 'desc')
3131
3232
// Update found job
33-
->update()
3433
->field('started')->set(new \MongoDate())
3534
->getQuery()
3635
->execute();
@@ -51,7 +50,6 @@ Here is an example where we return the new updated job document:
5150
->sort('priority', 'desc')
5251
5352
// Update found job
54-
->update()
5553
->field('started')->set(new \MongoDate())
5654
->field('in_progress')->set(true)
5755
->getQuery()
@@ -81,4 +79,4 @@ You can read more about the find and modify functionality on the
8179
.. note::
8280

8381
If you don't need to return the document, you can use just run a normal update which can
84-
affect multiple documents, as well.
82+
affect multiple documents, as well.

0 commit comments

Comments
 (0)