Return new instance of Collection from db.coll/db["coll"]

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: JavaScript, Shell
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently getting a collection from db.coll returns the same instance every time but calling db.getCollection("coll") will return a new instance every time. We should get these playing together.

      these return the same instance

      > var a = db.coll
      > var b = db.coll
      > a === b
      true
      

      these return new instances every time

      > var a = db.getCollection('coll')
      > var b = db.getCollection('coll')
      > a === b
      false
      

              Assignee:
              Geert Bosch
              Reporter:
              Scott Hernandez (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: