-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.1.7
-
Component/s: None
-
None
The driver currently does not validate documents for insert or update:
$bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(['foo.bar' => 1]); $bulk->insert(['x' => ['foo.bar' => 1]]); $manager = new MongoDB\Driver\Manager(URI); $manager->executeBulkWrite('test.foo', $bulk);
libmongoc's bulk write API does not validate documents for us. We will want to use the same logic (and validation flags) found in the relevant libmongoc collection methods.
- depends on
-
CDRIVER-2018 Introduce bulk write options to disable BSON validation
- Closed
-
CDRIVER-1341 Driver should validate BSON documents before insert and update
- Closed
- is depended on by
-
DRIVERS-308 BSON Key Validation in Drivers
- Closed
- is related to
-
PHPC-794 BulkWrite::update() silently ignores invalid arguments
- Closed
- related to
-
CDRIVER-2017 Inconsistent error reporting for insert, update, and replace BSON validation
- Closed
-
CDRIVER-1932 mongoc_collection_update() omits validation entirely for update documents
- Closed
-
SERVER-24589 Server allows storing documents with dotted field names
- Closed
-
CDRIVER-2018 Introduce bulk write options to disable BSON validation
- Closed
-
PHPC-944 MONGOC_ERROR_COMMAND_INVALID_ARG should yield InvalidArgumentException
- Closed
-
CDRIVER-2016 Report offending field name in BSON validation errors
- Closed
- links to