From 5ff97ce68d36a9e3e3dc2ddb77c87303c760008c Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 11 Oct 2016 12:27:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BModel=E7=B1=BBhas=E5=92=8Chas?= =?UTF-8?q?Where=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Model.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/library/think/Model.php b/library/think/Model.php index b9b55c44..a96c7d6e 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -1144,8 +1144,9 @@ abstract class Model implements \JsonSerializable, \ArrayAccess ->join($table . ' b', 'a.' . $info['localKey'] . '=b.' . $info['foreignKey'], $info['joinType']) ->group('b.' . $info['foreignKey']) ->having('count(' . $id . ')' . $operator . $count); - case Relation::HAS_MANY_THROUGH: - // TODO + case Relation::HAS_MANY_THROUGH: // TODO + default: + return $model; } } @@ -1176,8 +1177,9 @@ abstract class Model implements \JsonSerializable, \ArrayAccess ->field('a.*') ->join($table . ' b', 'a.' . $info['localKey'] . '=b.' . $info['foreignKey'], $info['joinType']) ->where($where); - case Relation::HAS_MANY_THROUGH: - // TODO + case Relation::HAS_MANY_THROUGH: // TODO + default: + return $model; } }