mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
修正预载入方法 并支持 find和select
This commit is contained in:
@@ -2016,7 +2016,7 @@ abstract class Driver
|
||||
if (!empty($options['with'])) {
|
||||
// 预载入
|
||||
$result = new $options['model']();
|
||||
return $result->eagerly($resultSet, $options['with']);
|
||||
return $result->eagerlyResultSet($resultSet, $options['with']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2123,6 +2123,10 @@ abstract class Driver
|
||||
if (!empty($options['relation'])) {
|
||||
$data->relationQuery($options['relation']);
|
||||
}
|
||||
if (!empty($options['with'])) {
|
||||
// 预载入
|
||||
$data->eagerlyResult($data, $options['with']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$data = false;
|
||||
|
||||
Reference in New Issue
Block a user