Skip to content

Commit eb3344a

Browse files
p-mongop
andauthored
Fix MONGOID-5366 #upsert misuses #update_one
(#5294) * Fix MONGOID-5366 #upsert misuses #update_one * add release notes documentation Co-authored-by: Oleg Pudeyev <[email protected]>
1 parent a985069 commit eb3344a

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

source/release-notes/mongoid-7.4.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,3 +572,11 @@ inside a hash. For example:
572572

573573
In Mongoid 8.0, the default value of the ``Mongoid.legacy_pluck_distinct`` option will
574574
change to ``false``.
575+
576+
577+
``update_one`` Warnings in ``upsert``
578+
-------------------------------------
579+
580+
Mongoid 7.4.1 fixes incorrect usage of the driver's ``update_one`` method from
581+
Mongoid's ``upsert`` method. Mongoid's ``upsert`` actually performs a
582+
replacing upsert, and Mongoid 7.4.1 and later correctly call ``replace_one``.

source/release-notes/mongoid-7.5.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,10 @@ The following functions are affected by this change:
8080
the selector can be strings or symbols, depending on what was passed to the
8181
operator.
8282

83+
84+
``update_one`` Warnings in ``upsert``
85+
-------------------------------------
86+
87+
Mongoid 7.5 fixes incorrect usage of the driver's ``update_one`` method from
88+
Mongoid's ``upsert`` method. Mongoid's ``upsert`` actually performs a
89+
replacing upsert, and Mongoid 7.5 correctly calls ``replace_one``.

0 commit comments

Comments
 (0)