Ouzo\Db\Relation::getRelationModelObject PHP Метод

getRelationModelObject() публичный Метод

public getRelationModelObject ( ) : Model
Результат Ouzo\Model
    public function getRelationModelObject()
    {
        return MetaModelCache::getMetaInstance(AutoloadNamespaces::getModelNamespace() . $this->class);
    }

Usage Example

Пример #1
0
 public function asJoinClause()
 {
     $joinedModel = $this->relation->getRelationModelObject();
     $joinTable = $joinedModel->getTableName();
     $joinKey = $this->relation->getForeignKey();
     $idName = $this->relation->getLocalKey();
     $onClauses = array(WhereClause::create($this->on), $this->relation->getCondition());
     return new JoinClause($joinTable, $joinKey, $idName, $this->fromTable, $this->alias, $this->type, $onClauses);
 }