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);
 }