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

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

public getForeignKey ( )
    public function getForeignKey()
    {
        return $this->foreignKey;
    }

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