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

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: 1.1.3
    • Fix Version/s: Backlog
    • Component/s: Shell
    • Labels:
      None
    • Environment:
      linux

      Description

      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

        Attachments

          Activity

            People

            • Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: