Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
None
-
*Location*: http://docs.mongodb.org/manual/core/index-unique/#unique-index-and-missing-field
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
*Referrer*: http://stackoverflow.com/questions/24430220/e11000-duplicate-key-error-index-in-mongodb-mongoose
*Screen Resolution*: 1920 x 1200
*repo*: docs
*source*: core/index-unique
*Location*: http://docs.mongodb.org/manual/core/index-unique/#unique-index-and-missing-field *User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36 *Referrer*: http://stackoverflow.com/questions/24430220/e11000-duplicate-key-error-index-in-mongodb-mongoose *Screen Resolution*: 1920 x 1200 *repo*: docs *source*: core/index-unique
-
true
Description
It'd be handy if the page on Unique Indexes actually referenced the error code that you get when you violate it, esp. the case w/ the null (unique index and missing field).
https://github.com/mongodb/docs/blob/master/source/core/index-unique.txt
Stackoverflow pages are the first few 'hits' for the error, and our docs should be.
i.e.
E11000 duplicate key error index: ... dup key: { : null }