Phalcon\Db\Adapter\MongoDB\BulkWriteResult::getUpsertedIds PHP Method

getUpsertedIds() public method

The index of each ID in the map corresponds to the document's position in bulk operation. If the document had an ID prior to upserting (i.e. the server did not need to generate an ID), this will contain its "_id". Any server-generated ID will be an MongoDB\BSON\ObjectID instance. This method should only be called if the write was acknowledged.
See also: BulkWriteResult::isAcknowledged()
public getUpsertedIds ( ) : mixed[]
return mixed[]
    public function getUpsertedIds()
    {
        if ($this->isAcknowledged) {
            return $this->writeResult->getUpsertedIds();
        }
        throw BadMethodCallException::unacknowledgedWriteResultAccess(__METHOD__);
    }