Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-445

Can't reference collection names beginning with an underscore in the mongo shell

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.1.3
    • Component/s: Shell
    • None
    • Environment:
      linux

      1. according to the MongoDB FAQ, collection names can begin with an underscore, but in mongo shell it results in

      MongoDB shell version: 1.1.3
      > db._a.insert({a: 1});
      Sun Nov 29 14:19:16 JS Error: TypeError: db._a has no properties (shell):0
      > db._a.findOne();
      Sun Nov 29 14:19:36 JS Error: TypeError: db._a has no properties (shell):0
      
      while
      > db.a.insert({a: 1});
      > db.a.findOne();
      { "_id" : ObjectId("4b1274ce2da8fd0af74f3a1c"), "a" : 1 }
      

      2. When inserting document with PHP driver it works

      3. I also tried mongodb-linux-i686-2009-11-29 nightly with the same result

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            dhagher Tomasz Ratajczak
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: