On 7/29/26 18:12, Rahul Goswami wrote:
...
==> if the atomic update logic sees a field with modifier in the supplied
doc, it treats the update as  atomic (partial) update. So if your actual
doc has 10 fields and in your above example in addition to “id” and “price”
(with “set” modifier) you have a third field say “product” (without
modifier), it will be treated as a partial update and all 10 fields should
still be present post update (ofcourse with the new values for “price” and
“product”).

So are you saying

{ "id" : "foo", "bar" : "baz" }

is equivalent to

{ "id" : "foo", "bar" : { "set" : "baz" }}

??

If true, it's a bug.

The 1st form should replace the original document with what's posted: 2 fields.

And if you mix full and partial update instructions in the same post, i.e.
{ "id" : "foo", "bar" : { "set" : "baz" }, "bleh" : "schmeh" }
that should error out.

Dima

Reply via email to