-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 0.2.0
-
Component/s: 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.
- is related to
-
SERVER-15456 relax validation of "query" field in count command for driver backwards compatibility
- Closed
- related to
-
PHPC-277 Ensure Query always serializes $query as a BSON object
- Closed