Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1289

mongo shell DBRef is not documented

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: manual
    • Labels:
      None

      http://docs.mongodb.org/manual/applications/database-references/#dbrefs

      It only mentions that the mongo shell offers a DBRef but there is nothing about usage nor an example.

      For example, it is unclear whether or not the second parameter in DBRef needs to be surrounded by quotes, or needs to be a proper ObjectId.

      It seems rather flexible when using it in the shell, i.e DBRef("coll", 1) seems to work, however, the JSON parser code insists that the second field is a quoted string containing 24 characters, see:

      https://github.com/mongodb/mongo/blob/master/src/mongo/db/json.cpp#L663

            Assignee:
            Unassigned Unassigned
            Reporter:
            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              7 years, 41 weeks, 6 days ago