Shell cannot access a collection named 'stats'

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • None
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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().

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

              Created:
              Updated:
              Resolved: