Unpack MongoDB\BSON\Serializable instances before reading properties

XMLWordPrintableJSON

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

      get_object_vars() returns an empty array for ArrayObject instances (e.g. MongoDB\Model\BSONDocument). This is problematic if such an object is used for an index specification or replacement document.

      We should check if an object implements MongoDB\BSON\Serializable and use the return value of its bsonSerialize() method if so. That is currently done for extract_id_from_inserted_document().

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

              Created:
              Updated:
              Resolved: