File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -517,8 +517,13 @@ Aggregation
517
517
518
518
:field upsert: when ``true``, creates a new document if the
519
519
specified ``query`` returns no documents. The
520
- default is ``false``.
520
+ default is ``false``. The return value for these
521
+ operations is ``null`` in version 2.2
521
522
523
+ .. versionchanged:: 2.2
524
+ Previously, ``upsert`` operations returned a an empty document
525
+ (e.g. ``{ }``,) see :ref:`the 2.2 release notes
526
+ <2.2-findandmodify-returns-null>` for more information.
522
527
523
528
For example:
524
529
Original file line number Diff line number Diff line change @@ -151,6 +151,8 @@ Compatibility Changes
151
151
.. TODO add sections here to describe compatibility changes with
152
152
regards to authentication, drivers, and mongos'
153
153
154
+ .. _2.2-findandmodify-returns-null:
155
+
154
156
``findAndMondify`` Returns Null value for Upserts
155
157
`````````````````````````````````````````````````
156
158
You can’t perform that action at this time.
0 commit comments