protected function createRelationFromList(
        $object,
        $relation,
        $list,
        $class,
        $column,
        $create = false
    ) {
        $object->$relation()->removeAll();

        foreach ($list as $name) {
            $name = trim($name);

            if (!empty($name)) {
                $obj = $class::get()->find($column, $name);

                if (empty($obj) && $create) {
                    $obj = $class::create();
                    $obj->$column = $name;
                    $obj->write();
                }

                if (!empty($obj)) {
                    $object->$relation()->add($obj);
                }
            }
        }
    }