Return the name of the related model.

@return string
347259
private function getRelatedModel()
    {
        $idSuffix = '_id';

        return substr($this->key, 0, strlen($this->key) - strlen($idSuffix));
    }
1071825
public function name() {
		$res = $this->_match;
		$count = count($res);

		if (empty($this->_stub['name'])) {
			return '';
		}
		$name = $this->_stub['name'];

		for ($i = 1; $i <= $count; $i++) {
			$name = str_ireplace('$' . $i, $res[$i - 1], $name);
		}
		return $name;
	}
500842
public function getRelationData(Model $model)
    {
        $relations = $this->getRelations($model);
        if (empty($relations)) {
            return [];
        }
        $return = [];

        foreach ($this->properties as $name => $details) {
            try {
                $related = $model->{$name};
                if (!is_object($model->$name())) {
                    continue;
                }
            } catch (Exception $ex) {
                continue;
            }

            if (is_null($related)) {
                $related = $model->$name()->getModel();
                array_set($return, $name, [get_class($related) => $related->getFillable()]);
            }
            if (!is_null($related) && method_exists($related, 'getAttributes')) {
                array_set($return, $name, [get_class($related) => $related->getAttributes()]);
            }
        }
        return $return;
    }
230014
public function getRelatedIds()
    {
        $fullKey = $this->relatedMap->getQualifiedKeyName();

        return $this->getQuery()->select($fullKey)->lists($this->relatedMap->getKeyName());
    }
1224114
protected function guessRelation()
    {
        if ($this->relation) {
            return $this->relation;
        }

        return Str::camel(str_replace('_id', '', $this->name));
    }
363904
public function getRelatedTable()
    {
        if ($this->relatedTableName) {
            return $this->table->getDatabaseMap()->getTable($this->relatedTableName);
        } else {
            throw new PropelException("Cannot fetch RelatedTable for column with no foreign key: " . $this->columnName);
        }
    }
549345
protected function getOtherKey()
    {
        if ($this->otherKey) {
            return $this->otherKey;
        }

        if (is_callable([$this->form->model(), $this->column]) &&
            ($relation = $this->form->model()->{$this->column}()) instanceof BelongsToMany
        ) {
            /* @var BelongsToMany $relation */
            $fullKey = $relation->getQualifiedRelatedPivotKeyName();

            return $this->otherKey = substr($fullKey, strpos($fullKey, '.') + 1);
        }

        throw new \Exception('Column of this field must be a `BelongsToMany` relation.');
    }
23887
public function tagsRelationTable() {
        $model_name = $this->owner->formName();
        if($model_name > 'Tag') {
            $relationship_table = 'Tag_' . $model_name;
        } else {
            $relationship_table = $model_name . '_Tag';
        }
        return $relationship_table;
    }
833144
public function get_name() {

        if (trim($this->model->name) === '') {
            return $this->get_target()->get_name();

        } else {
            return $this->model->name;
        }
    }
78649
public function getForeignModel()
    {
        $model = $this->getFullForeignModel();

        if ($this->isModel($model)) {
            return class_basename($model);
        }

        $position = strrpos($model, '\\');

        if ($position !== false) {
            return substr($model, $position + 1);
        }

        return '';
    }
651423
public function getName()
    {
        if ($this->schema && $this->getDatabase() && $this->getDatabase()->getPlatform() && $this->getDatabase()->getPlatform()->supportsSchemas()) {
            return $this->schema . '.' . $this->commonName;
        } else {
            return $this->commonName;
        }
    }
434403
public function getRelationNames()
    {
        $names = [];
        foreach ($this->getFields() as $field) {
            /**
             * @var Field $field
             */
            $relationshipName = $field->getRelationshipName($names);
            if ($relationshipName) {
                $names[] = $relationshipName;
            }
        }
        return $names;
    }
974136
protected function getRelationType()
    {
        list($model, $attribute) = $this->resolveModelAttribute($this->valueFrom);
        return $model->getRelationType($attribute);
    }
1365001
public function getName()
    {
        if ($this->database instanceof AbstractDatabase
            && $this->database->getName() !== $this->db->getCurrentDatabase()) {
            return $this->database->getName() . '.' . $this->name;
        }

        return $this->name;
    }
859267
protected function getAttributeName()
    {
        if ($this->getParamName() && ('single' === $this->get('datamode'))) {
            return $this->getMetaModel()->getAttribute($this->get('single_attr_id'))->getName();
        }

        if ($this->getParamName() && ('multi' === $this->get('datamode'))) {
            $firstAttribute  = $this->getMetaModel()->getAttribute($this->get('first_attr_id'));
            $secondAttribute = $this->getMetaModel()->getAttribute($this->get('second_attr_id'));

            $latName = $firstAttribute->getName();
            $lngName = $secondAttribute->getName();

            return $latName . '/' . $lngName;
        }

        return null;
    }
1336840
public function getModel()
    {
        if ($this->model == null) {
            $name = $this->relation->getReferencedModel();
            $this->model = new $name();
        }
        return $this->model;
    }
27141
public function getModelClass() {
		if ($this->model === null) {
			$introspection = $this->getIntrospectiveData();

			$modelBase = $introspection->name . self::MODEL_POSTFIX;
			$modelPath = $introspection->dirname . DIRECTORY_SEPARATOR .
						 $modelBase . '.' . $introspection->extension;

			$this->model = (is_file($modelPath))
				? $introspection->namespace . '\\' . $modelBase
				: self::MODEL_DEFAULT;
		}

		return $this->model;
	}