vendor/cakephp/cakephp/src/ORM/Association/BelongsTo.php 1 location
|
@@ 49-58 (lines=10) @@
|
| 46 |
|
* @param string|null $key the key to be used to link both tables together |
| 47 |
|
* @return string |
| 48 |
|
*/ |
| 49 |
|
public function foreignKey($key = null) |
| 50 |
|
{ |
| 51 |
|
if ($key === null) { |
| 52 |
|
if ($this->_foreignKey === null) { |
| 53 |
|
$this->_foreignKey = $this->_modelKey($this->target()->alias()); |
| 54 |
|
} |
| 55 |
|
return $this->_foreignKey; |
| 56 |
|
} |
| 57 |
|
return parent::foreignKey($key); |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
/** |
| 61 |
|
* Handle cascading deletes. |
vendor/cakephp/cakephp/src/ORM/Association/ExternalAssociationTrait.php 1 location
|
@@ 54-63 (lines=10) @@
|
| 51 |
|
* @param string|null $key the key to be used to link both tables together |
| 52 |
|
* @return string |
| 53 |
|
*/ |
| 54 |
|
public function foreignKey($key = null) |
| 55 |
|
{ |
| 56 |
|
if ($key === null) { |
| 57 |
|
if ($this->_foreignKey === null) { |
| 58 |
|
$this->_foreignKey = $this->_modelKey($this->source()->table()); |
| 59 |
|
} |
| 60 |
|
return $this->_foreignKey; |
| 61 |
|
} |
| 62 |
|
return parent::foreignKey($key); |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
/** |
| 66 |
|
* Sets the sort order in which target records should be returned. |
vendor/cakephp/cakephp/src/ORM/Association/HasOne.php 1 location
|
@@ 48-57 (lines=10) @@
|
| 45 |
|
* @param string|null $key the key to be used to link both tables together |
| 46 |
|
* @return string |
| 47 |
|
*/ |
| 48 |
|
public function foreignKey($key = null) |
| 49 |
|
{ |
| 50 |
|
if ($key === null) { |
| 51 |
|
if ($this->_foreignKey === null) { |
| 52 |
|
$this->_foreignKey = $this->_modelKey($this->source()->alias()); |
| 53 |
|
} |
| 54 |
|
return $this->_foreignKey; |
| 55 |
|
} |
| 56 |
|
return parent::foreignKey($key); |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
/** |
| 60 |
|
* Sets the property name that should be filled with data from the target table |
vendor/cakephp/cakephp/src/ORM/Association/BelongsToMany.php 1 location
|
@@ 159-168 (lines=10) @@
|
| 156 |
|
* @param string|null $key the key to be used to link both tables together |
| 157 |
|
* @return string |
| 158 |
|
*/ |
| 159 |
|
public function targetForeignKey($key = null) |
| 160 |
|
{ |
| 161 |
|
if ($key === null) { |
| 162 |
|
if ($this->_targetForeignKey === null) { |
| 163 |
|
$this->_targetForeignKey = $this->_modelKey($this->target()->alias()); |
| 164 |
|
} |
| 165 |
|
return $this->_targetForeignKey; |
| 166 |
|
} |
| 167 |
|
return $this->_targetForeignKey = $key; |
| 168 |
|
} |
| 169 |
|
|
| 170 |
|
/** |
| 171 |
|
* Sets the table instance for the junction relation. If no arguments |