mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进Model类relationQuery方法
This commit is contained in:
@@ -1492,6 +1492,9 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
// 支持闭包查询过滤关联条件
|
// 支持闭包查询过滤关联条件
|
||||||
$closure = $relation;
|
$closure = $relation;
|
||||||
$relation = $key;
|
$relation = $key;
|
||||||
|
} elseif (is_array($relation)) {
|
||||||
|
$subRelation = $relation;
|
||||||
|
$relation = $key;
|
||||||
}
|
}
|
||||||
if (strpos($relation, '.')) {
|
if (strpos($relation, '.')) {
|
||||||
list($relation, $subRelation) = explode('.', $relation, 2);
|
list($relation, $subRelation) = explode('.', $relation, 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user