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

Shell cannot access a collection named 'stats'

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Shell
    • None
    • ALL

    Description

      In the mongo shell, it is currently not possible to access a collection named 'stats' by using db.stats or db['stats'] as it conflicts with the function .stats(). This is not an issue in the Python or other drivers. This is not, as far as I can tell, documented anywhere.

      Temporary workaround is to use db.getCollection('stats').

      Potentially as another issue, db['stats'] should always use getCollection().

      Attachments

        Activity

          People

            Unassigned Unassigned
            tktech Tyler Kennedy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: