改进全局查询范围

This commit is contained in:
thinkphp
2016-10-01 15:32:37 +08:00
parent 3ec6e42183
commit a9782f094a
2 changed files with 6 additions and 17 deletions

View File

@@ -661,9 +661,6 @@ class Relation
public function __call($method, $args)
{
if ($this->query) {
$class = new $this->model;
// 全局作用域
$class->baseQuery($this->query);
switch ($this->type) {
case self::HAS_MANY:
if (isset($this->where)) {