File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ document that matches a specified filter.
60
60
.. example::
61
61
62
62
To update the *first* document in the ``sample_mflix.movies``
63
- collection where ``title`` equals ``"Tag "``:
63
+ collection where ``title`` equals ``"Twilight "``:
64
64
65
65
.. code-block:: javascript
66
66
@@ -69,16 +69,15 @@ document that matches a specified filter.
69
69
db.movies.updateOne( { title: "Twilight" },
70
70
{
71
71
$set: {
72
- plot: "A teenage girl risks everything–including her life–when she
73
- falls in love with a vampire."
72
+ plot: "A teenage girl risks everything–including her life–when she falls in love with a vampire."
74
73
},
75
74
$currentDate: { lastUpdated: true }
76
75
})
77
76
78
77
The update operation:
79
78
80
79
- Uses the :update:`$set` operator to update the value of the
81
- ``plot`` field for the movie ``Tag ``.
80
+ ``plot`` field for the movie ``Twilight ``.
82
81
83
82
- Uses the :update:`$currentDate` operator to update the value
84
83
of the ``lastUpdated`` field to the current date. If
You can’t perform that action at this time.
0 commit comments