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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Unknown
    • 1.16.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: