Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-2216

BulkWrite::insert() does not generate _id for Document or PackedArray

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.16.0
    • Affects Version/s: None
    • Component/s: None
    • None

      When php_phongo_zval_to_bson_internal() appends raw data from a Document or PackedArray instance, it jumps past the code responsible for generating an "_id" field.

      If the Document or PackedArray instance does not already include an "_id" field, BulkWrite::insert() will ultimately return nothing. libmongoc will likely still generate its own "_id" in _mongoc_write_command_insert_append(), but that won't be reported in PHP.

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: