Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-892

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.11.2
    • Codecs
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nlloyd Nick Lloyd
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: