Driver should validate BSON documents before insert and update

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.3.0-beta1, 1.3.0
    • Affects Version/s: 1.1.7
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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.

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

              Created:
              Updated:
              Resolved: