修正 数据表没有主键的情况下 getpk方法错误

This commit is contained in:
thinkphp
2016-01-27 16:52:45 +08:00
parent 534230fd22
commit 9903717cc4

View File

@@ -1139,6 +1139,8 @@ class Model
if (isset($pk)) {
// 设置主键
$this->pk = count($pk) > 1 ? $pk : $pk[0];
} else {
$this->pk = null;
}
// 记录字段类型信息
$this->fields['_type'] = $type;