-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
Description
From the docs:
"The _id field may contain values of any BSON data type, other than an array."
https://docs.mongodb.com/manual/core/document/#the-_id-field
However, regexes and undefined are also disallowed as values for _id. The docs should be updated to reflect this restriction. Code:
https://github.com/mongodb/mongo/blob/cf55779be0b1ed2f12c71e13e634b81007094777/src/mongo/db/ops/insert.cpp#L137-L144