public function updateRelated()
    {
        foreach ($this->related as $name => $value) {
            if ($value instanceof Manager) {
                continue;
            }

            /** @var \Mindy\Orm\Fields\RelatedField $field */
            $field = $this->getField($name);
            if ($field instanceof HasManyField) {
                continue;
            }
            if (empty($value)) {
                $field->getManager()->clean();
            } else {
                $field->setValue($value);
            }
        }
        $this->related = [];
    }
public function updateRelated()
    {
        foreach ($this->related as $name => $value) {
            if ($value instanceof Manager) {
                continue;
            }

            /** @var \Mindy\Orm\Fields\RelatedField $field */
            $field = $this->getField($name);
            if ($field instanceof HasManyField) {
                continue;
            }
            if (empty($value)) {
                $field->getManager()->clean();
            } else {
                $field->setValue($value);
            }
        }
        $this->related = [];
    }
public function updateRelated ( ) { foreach ( $ this -> related as $ name => $ value ) { if ( $ value instanceof Manager ) { continue ; } /** @var \Mindy\Orm\Fields\RelatedField $field */ $ field = $ this -> getField ( $ name ) ; if ( $ field instanceof HasManyField ) { continue ; } if ( empty ( $ value ) ) { $ field -> getManager ( ) -> clean ( ) ; } else { $ field -> setValue ( $ value ) ; } } $ this -> related = [ ] ; }
Update related models.
Update related models .