mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
改进
This commit is contained in:
@@ -267,9 +267,8 @@ abstract class OneToOne extends Relation
|
|||||||
// 预载入关联查询 支持嵌套预载入
|
// 预载入关联查询 支持嵌套预载入
|
||||||
if ($closure) {
|
if ($closure) {
|
||||||
call_user_func_array($closure, [ & $model]);
|
call_user_func_array($closure, [ & $model]);
|
||||||
if ($model->getOptions('with_field')) {
|
if ($field = $model->getOptions('with_field')) {
|
||||||
$model->field($model->getOptions('with_field'));
|
$model->field($field)->removeOption('with_field');
|
||||||
$model->removeOption('with_field');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$list = $model->where($where)->with($subRelation)->select();
|
$list = $model->where($where)->with($subRelation)->select();
|
||||||
|
|||||||
Reference in New Issue
Block a user