Can create invalid dbref using insert

XMLWordPrintableJSON

    • Query Optimization
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      $id should be a required field of a dbref, but it is not enforced in insert:

      > db.coll.insert({a: {$ref: "c", $db: "test"}})
      WriteResult({ "nInserted" : 1 })
      > db.coll.find()
      { "_id" : ObjectId("594d2455ae497a9bea475a72"), "a" : { "$ref" : "c", "$db" : "test" } }
      

              Assignee:
              Unassigned
              Reporter:
              Tess Avitabile (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: