[SERVER-445] Can't reference collection names beginning with an underscore in the mongo shell Created: 29/Nov/09 Updated: 16/Apr/21 Resolved: 22/May/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 1.1.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Tomasz Ratajczak | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Done | Votes: | 5 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
linux |
||
| Issue Links: |
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
1. according to the MongoDB FAQ, collection names can begin with an underscore, but in mongo shell it results in
2. When inserting document with PHP driver it works 3. I also tried mongodb-linux-i686-2009-11-29 nightly with the same result |
| Comments |
| Comment by Matt Lord (Inactive) [ 22/May/18 ] | ||||
|
Closing this for now since the described behavior is intentional and documented. If I missed or misunderstood something, please let me know. Thank you! | ||||
| Comment by Asya Kamsky [ 22/May/18 ] | ||||
|
matt.lord is there a reason not to close this ticket (given this is WAD and there is a docs note about it)?
| ||||
| Comment by Asya Kamsky [ 27/Dec/17 ] | ||||
|
There is a note in the documentation about this: https://docs.mongodb.com/manual/reference/limits/index.html#Restriction-on-Collection-Names
| ||||
| Comment by Asya Kamsky [ 30/Oct/16 ] | ||||
Should this ticket be changed to documentation ticket? | ||||
| Comment by Shawn Welch [ 04/Mar/14 ] | ||||
|
Still not working. Why not? Yo: http://docs.mongodb.org/manual/reference/limits/#Restriction on Collection Names Wudupwidit? Now I can't even drop the stupid collection. | ||||
| Comment by MattyG [ 06/Sep/13 ] | ||||
|
This bug is still present. Can anyone tell me why the leading underscore semantic is special? When/where is is used etc? | ||||
| Comment by auto [ 05/Oct/11 ] | ||||
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: -
| ||||
| Comment by Eliot Horowitz (Inactive) [ 27/Sep/11 ] | ||||
|
Not sure - this is why its in planned bucket b - shouldn't work on right now | ||||
| Comment by Antoine Girbal [ 26/Sep/11 ] | ||||
|
what behavior do you want? | ||||
| Comment by Eliot Horowitz (Inactive) [ 26/Sep/11 ] | ||||
|
We can do something better | ||||
| Comment by Antoine Girbal [ 16/Sep/11 ] | ||||
|
yes there is a piece of code in the interceptor, that will only look at real JS properties if the property name starts with "_". But with "_" it is possible to set properties: fixing doc on this in wiki. | ||||
| Comment by Eliot Horowitz (Inactive) [ 17/Mar/11 ] | ||||
|
we should provide a warning or something, not sure exactly what - but the behavior shouldn't change in 2.0, just docs, warnings, etc. | ||||
| Comment by dan [ 29/May/10 ] | ||||
|
This could be a documentation error, perhaps? This is mentioned on the docs at http://www.mongodb.org/display/DOCS/Collections | ||||
| Comment by Eliot Horowitz (Inactive) [ 15/Mar/10 ] | ||||
|
Right - sorry. | ||||
| Comment by Aaron Wieland [ 15/Mar/10 ] | ||||
|
Even db["_a"] doesn't work for me. For example, db["_Feeds"].count() yields the error, "JS Error: TypeError: db._Feeds has no properties (shell):0". I'm using version 1.1.4-. | ||||
| Comment by Eliot Horowitz (Inactive) [ 12/Mar/10 ] | ||||
|
this is a problem just with the shell |