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

mongo shell DBRef is not documented

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • None
    • None
    • manual
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                6 years, 44 weeks, 3 days ago