改进Model类的save方法

This commit is contained in:
thinkphp
2016-06-04 23:11:42 +08:00
parent 33e045c1e5
commit 850aa53374

View File

@@ -497,7 +497,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
}
// 数据对象赋值
foreach ($data as $key => $value) {
$this->setAttr($key, $value);
$this->setAttr($key, $value, $data);
}
if (!empty($where)) {
$this->isUpdate = true;