修正Connection类

This commit is contained in:
thinkphp
2017-04-07 19:02:05 +08:00
parent f1366f7833
commit a05397b341
2 changed files with 8 additions and 8 deletions

View File

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