Details
Description
Mongo does not allow the creation of collections with an empty string as the name, but it is possible to rename an existing collection to "".
To reproduce:
> db[""].save(
{x:2}) // it is not possible to create a new collection with an empty string as the name
invalid ns: test.
> db.getCollection("").save(
)
invalid ns: test.
> db.test.save(
) // it is possible to rename an existing collection to an empty string
> db.test.renameCollection("")
> db[""].find()
{ "_id" : ObjectId("4ede683f5833a9b2c91c8dc0"), "x" : 2 }>
Attachments
Issue Links
- is related to
-
DOCS-564 2.2.0 release notes should mention breaking change -- $ is no longer a legal character in collection names
-
- Closed
-