diff --git a/library/think/model/relation/BelongsToMany.php b/library/think/model/relation/BelongsToMany.php index ccb43be4..486f08d8 100644 --- a/library/think/model/relation/BelongsToMany.php +++ b/library/think/model/relation/BelongsToMany.php @@ -186,7 +186,7 @@ class BelongsToMany extends Relation * @param string $foreignKey 关联模型关联键 * @param string $localKey 当前模型关联键 * @param array $condition 关联查询条件 - * @return \think\db\Query|string + * @return Query */ protected function belongsToManyQuery($table, $foreignKey, $localKey, $condition = []) { diff --git a/library/think/model/relation/HasManyThrough.php b/library/think/model/relation/HasManyThrough.php index 9f4c0431..9339d505 100644 --- a/library/think/model/relation/HasManyThrough.php +++ b/library/think/model/relation/HasManyThrough.php @@ -54,19 +54,6 @@ class HasManyThrough extends Relation return $this->select(); } - /** - * 预载入关联查询 - * @access public - * @param Query $query 查询对象 - * @param string $relation 关联名 - * @param bool $first 是否需要使用基础表 - * @return void - */ - public function eagerly(Query $query, $relation, $subRelation, $closure, $first) - { - - } - /** * 预载入关联查询 * @access public @@ -79,7 +66,6 @@ class HasManyThrough extends Relation */ public function eagerlyResultSet(&$resultSet, $relation, $subRelation, $closure, $class) { - } /** @@ -94,7 +80,6 @@ class HasManyThrough extends Relation */ public function eagerlyResult(&$result, $relation, $subRelation, $closure, $class) { - } /** diff --git a/library/think/model/relation/MorphTo.php b/library/think/model/relation/MorphTo.php index 2b370e08..6de1d4f4 100644 --- a/library/think/model/relation/MorphTo.php +++ b/library/think/model/relation/MorphTo.php @@ -73,12 +73,14 @@ class MorphTo extends Relation } /** - * 预载入关联查询 返回数据集 + * 预载入关联查询 * @access public * @param array $resultSet 数据集 - * @param string $relation 关联名 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 * @param string $class 数据集对象名 为空表示数组 - * @return array + * @return void */ public function eagerlyResultSet(&$resultSet, $relation, $subRelation, $closure, $class) { @@ -116,12 +118,14 @@ class MorphTo extends Relation } /** - * 预载入关联查询 返回模型对象 + * 预载入关联查询 * @access public * @param Model $result 数据对象 - * @param string $relation 关联名 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 * @param string $class 数据集对象名 为空表示数组 - * @return Model + * @return void */ public function eagerlyResult(&$result, $relation, $subRelation, $closure, $class) { @@ -139,7 +143,7 @@ class MorphTo extends Relation * @param array $where 关联预查询条件 * @param string $relation 关联名 * @param string $subRelation 子关联 - * @return array + * @return void */ protected function eagerlyMorphToOne($model, $relation, &$result, $subRelation = '') {