修正Merge模型的save方法

This commit is contained in:
thinkphp
2016-08-03 15:39:57 +08:00
parent e71c3630cd
commit 5dad96ab66

View File

@@ -189,8 +189,12 @@ class Merge extends Model
if (!empty($where)) {
$pk = $this->getPk();
if (is_string($pk) && isset($data[$pk])) {
unset($data[$pk]);
if (isset($this->mapFields[$pk])) {
$pk = $this->mapFields[$pk];
}
if (isset($where[$pk])) {
unset($where[$pk]);
}
}