改进Model类的save方法

This commit is contained in:
thinkphp
2016-06-17 12:04:08 +08:00
parent dcc1f7b15e
commit a0f1a7f436

View File

@@ -616,6 +616,8 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
} }
// 标记为更新 // 标记为更新
$this->isUpdate = true; $this->isUpdate = true;
// 清空change
$this->change = [];
// 新增回调 // 新增回调
$this->trigger('after_insert', $this); $this->trigger('after_insert', $this);
} }