-
Type:
Improvement
-
Resolution: Done
-
Priority:
Minor - P4
-
Affects Version/s: 2.1.16
-
Component/s: MongoDB 3.2
When trying to create index with next code
db.collection( COLLECTION_NAME ).createIndex( { 'key.external_id': 1, 'key.type': 1 }, { unique: true, sparse: true, name: INDEX_NAME}, next )
I've got next error
{ [MongoError: key key.external_id must not contain '.'] name: 'MongoError', message: 'key key.external_id must not contain \'.\'' }
This error is produced by bson library (e.g. bson.checkKey). By deeper research:
- This behavior is controlled by checkKey option, that passed to bson.
- The checkKey option is set to false (which is OK) in node-mongodb-native.
- But it is always set to true and passed options are ignored here in mongodb-core.
Please suggest a solution on this issue.