Empty ReadConcern and WriteConcern should serialize to BSON documents

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.2.0
    • Affects Version/s: 1.2.0-alpha3
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Since ReadConcern and WriteConcern may be empty by default, it's possible for their bsonSerialize() methods to return an empty array. This will result in serialization to a BSON array, which would be rejected by the server. We should ensure an object is always returned from these methods.

      This is not an issue for ReadPreference, since it will always contain at least a "mode" field; however, we can also return an object for good measure.

              Assignee:
              Jeremy Mikola
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: