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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Works as Designed
    • 1.1.3
    • None
    • Shell
    • None
    • 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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: