Prado\Data\ActiveRecord\Relations\TActiveRecordHasOne::setObjectProperty PHP Метод

setObjectProperty() защищенный Метод

Sets the foreign objects to the given property on the source object.
protected setObjectProperty ( $source, $properties, &$collections )
    protected function setObjectProperty($source, $properties, &$collections)
    {
        $hash = $this->getObjectHash($source, $properties);
        $prop = $this->getContext()->getProperty();
        if (isset($collections[$hash]) && count($collections[$hash]) > 0) {
            if (count($collections[$hash]) > 1) {
                throw new TActiveRecordException('ar_belongs_to_multiple_result');
            }
            $source->setColumnValue($prop, $collections[$hash][0]);
        }
    }