|
in db.collection.update() we should call out that there is additional validation between the query and update objects, and that the paths must match if _id is specified in the update, and that dotted paths aren't acceptable in the query (e.g. _id.field)
Changed in SERVER-14973
Scott and Greg discussed this during the code review
Example:
> q={'_id.git_hash': 'e6577bc37'}
|
> u={'count': 49.97, '_id': {'hash': 'e6577bc37'}}
|
|
> db.coll_name.update(q,u,upsert=true)
|
|
WriteResult({
|
"nMatched" : 0,
|
"nUpserted" : 0,
|
"nModified" : 0,
|
"writeError" : {
|
"code" : 111,
|
"errmsg" : "field at '_id' must be exactly specified, field at sub-path '_id.build_id'found"
|
}
|
})
|
|