mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
修正has方法
This commit is contained in:
@@ -74,7 +74,7 @@ class HasOne extends OneToOne
|
|||||||
return $this->parent->db()
|
return $this->parent->db()
|
||||||
->alias($model)
|
->alias($model)
|
||||||
->whereExists(function ($query) use ($table, $model, $relation, $localKey, $foreignKey) {
|
->whereExists(function ($query) use ($table, $model, $relation, $localKey, $foreignKey) {
|
||||||
$query->table([$table => $relation])->field($relation . '.' . $foreignKey)->whereExp($model . '.' . $localKey, '=' . $relatoin . '.' . $foreignKey);
|
$query->table([$table => $relation])->field($relation . '.' . $foreignKey)->whereExp($model . '.' . $localKey, '=' . $relation . '.' . $foreignKey);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user