getQualifiedForeignKey() публичный метод

Get the fully qualified foreign key of the relationship.
public getQualifiedForeignKey ( ) : string
Результат string
Пример #1
2
 protected function joinBelongsToRelation(Relations\BelongsTo $relation, $type)
 {
     $table = $relation->getRelated()->getTable();
     $foreignKey = $relation->getQualifiedForeignKey();
     $localKey = $relation->getQualifiedOtherKeyName();
     $this->query->join($table, $foreignKey, '=', $localKey, $type);
 }
Пример #2
2
 /**
  * Add select with alias to query from "belongs to" relation
  *
  * @param Builder   $query
  * @param BelongsTo $relatedModel
  */
 private function addBelongsToSelect(Builder $query, BelongsTo $relatedModel)
 {
     $query->getQuery()->join($relatedModel->getRelated()->getTable(), $relatedModel->getQualifiedForeignKey(), '=', $relatedModel->getQualifiedOtherKeyName());
 }
Пример #3
0
 private function generateJoinFromBelongsTo(BelongsTo $relation)
 {
     // Related Table Generated On
     $generatedOnClause = [$relation->getQualifiedOtherKeyName(), $relation->getQualifiedForeignKey()];
     // Related Table Join
     $this->generateJoin($this->related->getTable(), $this->compileOns($generatedOnClause), $this->nested ? $this->conditions[$this->index] : $this->conditions);
 }