改进数据库类的一处不能嵌套查询的缺陷

This commit is contained in:
thinkphp
2017-05-11 18:39:06 +08:00
parent 7576b88c99
commit 6e721239ea
2 changed files with 5 additions and 26 deletions

View File

@@ -176,7 +176,6 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
// 设置当前模型 确保查询返回模型对象
$queryClass = $this->query ?: $con->getConfig('query');
$query = new $queryClass($con, $this->class);
$con->setQuery($query, $this->class);
// 设置当前数据表和模型名
if (!empty($this->table)) {