Reorder DBRef fields to have $ref/$id/$db first

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Unknown
    • bson-4.13.0
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      The dbref spec (https://github.com/mongodb/specifications/blob/master/source/extended-json.rst) requires that the special fields are first in the hash. I suggest reordering the fields in the constructor which will then automatically produce the correct serialization output e.g. in bson.

            Assignee:
            Neil Shweky (Inactive)
            Reporter:
            Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: