-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: manual
-
Labels:None
-
0.2
The example for db.cloneCollection() at the page https://docs.mongodb.com/manual/reference/method/db.cloneCollection/ stated:
db.cloneCollection('mongodb.example.net:27017', 'users.profile', { 'active' : true } )
The users.profile collection name is incorrect, since currently the db.cloneCollection() function auto-appends the current database name (https://github.com/mongodb/mongo/blob/v3.4/src/mongo/shell/db.js#L382).
The correct example should be (assuming we are in the users database):
db.cloneCollection('mongodb.example.net:27017', 'profile', { 'active' : true } )