改进关联模型

This commit is contained in:
thinkphp
2017-04-01 16:13:44 +08:00
parent 2ebf07ba16
commit d3be47e269
7 changed files with 39 additions and 13 deletions

View File

@@ -57,6 +57,7 @@ class HasManyThrough extends Relation
if ($closure) {
call_user_func_array($closure, [ & $this->query]);
}
return $this->relation($subRelation)->select();
}
@@ -96,8 +97,7 @@ class HasManyThrough extends Relation
* @return void
*/
public function eagerlyResultSet(&$resultSet, $relation, $subRelation, $closure, $class)
{
}
{}
/**
* 预载入关联查询 返回模型对象
@@ -110,8 +110,7 @@ class HasManyThrough extends Relation
* @return void
*/
public function eagerlyResult(&$result, $relation, $subRelation, $closure, $class)
{
}
{}
/**
* 关联统计
@@ -121,8 +120,7 @@ class HasManyThrough extends Relation
* @return integer
*/
public function relationCount($result, $closure)
{
}
{}
/**
* 执行基础查询(进执行一次)