mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
修正Relation
This commit is contained in:
@@ -112,7 +112,7 @@ class Relation
|
|||||||
case self::BELONGS_TO:
|
case self::BELONGS_TO:
|
||||||
foreach ($resultSet as $result) {
|
foreach ($resultSet as $result) {
|
||||||
// 模型关联组装
|
// 模型关联组装
|
||||||
$this->modelRelationBuild($model, $relation, $result);
|
$this->match($model, $relation, $result);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case self::HAS_MANY:
|
case self::HAS_MANY:
|
||||||
@@ -126,7 +126,7 @@ class Relation
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($range)) {
|
if (!empty($range)) {
|
||||||
$data = $this->modelRelationQuery($model, [$foreignKey => ['in', $range]], $relation, $subRelation);
|
$data = $this->eagerly($model, [$foreignKey => ['in', $range]], $relation, $subRelation);
|
||||||
|
|
||||||
// 关联数据封装
|
// 关联数据封装
|
||||||
foreach ($resultSet as $result) {
|
foreach ($resultSet as $result) {
|
||||||
|
|||||||
Reference in New Issue
Block a user