BulkWrite::insert() does not generate ObjectID if another field has "_id" prefix

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.1.6
    • Affects Version/s: 1.1.5
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When phongo_zval_to_bson() checks whether an "_id" field should be injected (for insertions), it uses strncmp() and limits the comparison to three characters. This means it will skip "_id" injection if another field has an "_id" prefix, which ultimately puts the onus the server to generate an ID for the document.

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

              Created:
              Updated:
              Resolved: