Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
None
-
*Location*: http://docs.mongodb.org/manual/reference/operator/update/#id1
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36
*Referrer*: http://docs.mongodb.org/manual/reference/command/update/
*Screen Resolution*: 1920 x 1080
*repo*: docs
*source*: reference/operator/update
*Location*: http://docs.mongodb.org/manual/reference/operator/update/#id1 *User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36 *Referrer*: http://docs.mongodb.org/manual/reference/command/update/ *Screen Resolution*: 1920 x 1080 *repo*: docs *source*: reference/operator/update
Description
"an existing document" phrase appears multiple times, but I don't think it's accurate.
$set will set a field in an upserted document just the same as existing document.
$min and $max do not require the field to exist, and are also phrased backwards.
$addToSet does not require the array to exist.