[SERVER-38126] Unable to drop a collection with "@" in name Created: 14/Nov/18 Updated: 30/Nov/18 Resolved: 30/Nov/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Suresh L. Prajapati | Assignee: | Danny Hatcher (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | Linux |
| Participants: |
| Description |
|
I am trying to drop some collections, but It's not working. Below are the commands: I am trying to remove all collections having "@" in thier name, but on executing drop() command it is returning false. rs-ds4564584:PRIMARY> db['to@example.com>'].drop() Please help me on how I can delete all such collections. |
| Comments |
| Comment by Danny Hatcher (Inactive) [ 15/Nov/18 ] | |
|
Hello Suresh, Per our documentation, if your collection contains special characters such as @ then you would use the use the db.getCollection() method in the mongo shell. The following drops the "asd@test.com" collection:
Thank you, Danny |