[SERVER-492] when doing upsert with $filter, don't use $as new fields Created: 16/Dec/09  Updated: 12/Jul/16  Resolved: 16/Dec/09

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: None
Fix Version/s: 1.3.0

Type: Improvement Priority: Major - P3
Reporter: Eliot Horowitz (Inactive) Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-390 upsert with x.y query misinterpreted ... Closed
Participants:

 Description   

> db.test.update( { name: 'ian', fruits:

{ $ne: 'apple' }

}, { $push:

{ fruits: 'apple' }

},

{ upsert: true }

);
Cannot apply $push/$pushAll modifier to non-array



 Comments   
Comment by Eliot Horowitz (Inactive) [ 16/Dec/09 ]

see http://github.com/mongodb/mongo/blob/master/jstests/update8.js

Comment by auto [ 16/Dec/09 ]

Author:

{'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: when doing upsert, don't copy $ filters SERVER-492
http://github.com/mongodb/mongo/commit/de3db911a0a9a7cd0e6b668cda1d45fe44c05155

Generated at Thu Feb 08 02:54:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.