[SERVER-29953] Numeric collection name Created: 02/Jul/17 Updated: 03/Jul/17 Resolved: 03/Jul/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Joel Mamedov | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
At the shell count() or find() returns error (see below) when referencing collection that named with numeric value. But, as a test created alphanumeric collection name and no errors db.3330.find(); 3330.count() > db.opp_3330.count(); |
| Comments |
| Comment by Stennie Steneker (Inactive) [ 03/Jul/17 ] | ||
|
Hi Joel, This is expected behaviour for collection names that are not valid JavaScript identifiers. You can reference those in the mongo shell using db.getCollection(name), eg:
Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. Regards, |