mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-10 08:32:48 +08:00
修正JOIN方式一对一关联预载入闭包查询
This commit is contained in:
@@ -67,6 +67,7 @@ abstract class OneToOne extends Relation
|
||||
$field = true;
|
||||
}
|
||||
$query->field($field, false, $table, $alias);
|
||||
$field = null;
|
||||
}
|
||||
|
||||
// 预载入封装
|
||||
@@ -91,10 +92,8 @@ abstract class OneToOne extends Relation
|
||||
}
|
||||
} elseif (isset($this->option['field'])) {
|
||||
$field = $this->option['field'];
|
||||
} else {
|
||||
$field = true;
|
||||
}
|
||||
$query->field($field, false, $joinTable, $joinAlias, $relation . '__');
|
||||
$query->field(isset($field) ? $field : true, false, $joinTable, $joinAlias, $relation . '__');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user