DefaultDBCallback.objectDone() creates invalid DBRef objects according to mongodb spec

XMLWordPrintableJSON

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

      In the official mongodb jstest dbref3.js (https://github.com/mongodb/mongo/blob/r2.4.5/jstests/dbref3.js) a DBRef must meet the following criteria:

      • contain $ref and $id fields
      • $ref must be the first field in the JavaScript object
      • $id must be the second field in the JavaScript object
      • the value associated with $ref must be a String

      Currently the Java driver only checks if the two fields exist and performs a naive toString() on the $ref value.

            Assignee:
            Unassigned
            Reporter:
            Nick Lloyd
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: