File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
source/reference/operator Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 10
10
11
11
The positional :operator:`$` operator identifies an element in an
12
12
``array`` field to update without explicitly specifying the position
13
- of the element in the array. The positional :operator:`$` operator
14
- is used in conjunction with the :method:`update()
13
+ of the element in the array. The positional :operator:`$` operator,
14
+ when used with the :method:`update()
15
15
<db.collection.update()>` method and acts as a placeholder for the
16
16
**first match** of the update ``query selector``:
17
17
69
69
Consider the following behaviors when using the positional
70
70
:operator:`$` operator:
71
71
72
- - The positional :operator:`$` operator should not be used with an
73
- :term:`upsert` since an insert will use the ``$`` as a field name
72
+ - Do not use the positional operator :operator:`$` with
73
+ :term:`upsert` operations because, inserts will use the ``$`` as a field name
74
74
in the inserted document.
75
75
76
76
- When used with the :operator:`$unset` operator, the positional
77
77
:operator:`$` operator does not remove the matching element from
78
- the array but rather set it to ``null``.
78
+ the array but rather sets it to ``null``.
79
79
80
80
.. seealso::
81
81
You can’t perform that action at this time.
0 commit comments