改进Model类的getTableInfo方法 当用table方法指定多个表join操作的时候不获取字段信息

This commit is contained in:
thinkphp
2016-02-04 21:52:10 +08:00
parent 13259ce755
commit b94346a6b4

View File

@@ -1094,6 +1094,10 @@ class Model
if (!$tableName) {
$tableName = isset($this->options['table']) ? $this->options['table'] : $this->getTableName();
}
if (strpos($tableName, ',')) {
// 多表不获取字段信息
return false;
}
$guid = md5($tableName);
$result = Cache::get($guid);
if (!$result) {