Ensure query/filter args always serialize as BSON documents

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 0.2.0
    • Affects Version/s: 0.2.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      CRUD methods that take filter arrays should ensure that they are cast to objects to guarantee serialization to a BSON document. Server 3.0+ is more strict about types, and BSON arrays may no longer be allowed where objects are expected.

      Note that this is inconsistent for some commands (e.g. count was relaxed in SERVER-15456), but we should be consistent throughout.

      For methods where filters are truly optional, we should simply omit the value rather than casting an empty array.

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

                Created:
                Updated:
                Resolved: