-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.2.25
-
Component/s: MongoDB 3.2, MongoDB 3.4
-
Empty show more show less
For example I have the vehicles collection with items as the example below:
{
"_id" : ObjectId("58d7f5a8e0661b63f05f690c"),
"imei" : "000000000000001",
"customerId" : ObjectId("58d7f48be0661b63f05f4a25"),
"gsmNo" : "0000000002",
"licensePlate" : "X-8830-34",
"audit" :
{
"updatedAt" : ISODate("2011-05-22T08:20:02.000Z"),
"deletedAt" : ISODate("2010-08-26T08:31:59.000Z")
},
"accessControl" :
{
"get" : [
ObjectId("58d7f47ee0661b63f05f0836"),
ObjectId("58d7f47ee0661b63f05f0837")
],
"patch" : [
ObjectId("58d7f480e0661b63f05f0867"),
ObjectId("58d7f47ee0661b63f05f07c3")
],
"put" : [
ObjectId("58d7f47ee0661b63f05f07c3"),
ObjectId("58d7f47ee0661b63f05f07c5")
],
"update" : [
ObjectId("58d7f47ee0661b63f05f07c3"),
ObjectId("58d7f47ee0661b63f05f07c5"),
ObjectId("58d7f47ee0661b63f05f07ca"),
ObjectId("58d7f47ee0661b63f05f07cb"),
ObjectId("58d7f47ee0661b63f05f07cc")
],
"delete" : [
ObjectId("58d7f47ee0661b63f05f07c3"),
ObjectId("58d7f47ee0661b63f05f07c5")
]
}
}
Trying to create an index via
db.collection.createIndex({'accessControl.get': 1}, {background: true}, cb);
results in error:
key accessControl.get must not contain '.'