Nextras\Orm\Relationships\OneHasOne::updateRelationship PHP Метод

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

protected updateRelationship ( $oldEntity, $newEntity, $allowNull )
    protected function updateRelationship($oldEntity, $newEntity, $allowNull)
    {
        $key = $this->metadata->relationship->property;
        if (!$key) {
            return;
        }
        $this->updatingReverseRelationship = true;
        if ($oldEntity) {
            $oldEntity->getProperty($key)->set(null, $allowNull);
        }
        if ($newEntity) {
            $newEntity->getProperty($key)->set($this->parent, $allowNull);
        }
        $this->updatingReverseRelationship = false;
    }