mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
Update OneToOne.php
This commit is contained in:
@@ -78,9 +78,9 @@ abstract class OneToOne extends Relation
|
|||||||
$query->via($joinAlias);
|
$query->via($joinAlias);
|
||||||
|
|
||||||
if ($this instanceof BelongsTo) {
|
if ($this instanceof BelongsTo) {
|
||||||
$query->join($joinTable . ' ' . $joinAlias, $alias . '.' . $this->foreignKey . '=' . $joinAlias . '.' . $this->localKey, $this->joinType);
|
$query->join([$joinTable => $joinAlias], $alias . '.' . $this->foreignKey . '=' . $joinAlias . '.' . $this->localKey, $this->joinType);
|
||||||
} else {
|
} else {
|
||||||
$query->join($joinTable . ' ' . $joinAlias, $alias . '.' . $this->localKey . '=' . $joinAlias . '.' . $this->foreignKey, $this->joinType);
|
$query->join([$joinTable => $joinAlias], $alias . '.' . $this->localKey . '=' . $joinAlias . '.' . $this->foreignKey, $this->joinType);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($closure) {
|
if ($closure) {
|
||||||
|
|||||||
Reference in New Issue
Block a user