mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
改进Model类的save方法
This commit is contained in:
@@ -497,7 +497,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
}
|
}
|
||||||
// 数据对象赋值
|
// 数据对象赋值
|
||||||
foreach ($data as $key => $value) {
|
foreach ($data as $key => $value) {
|
||||||
$this->setAttr($key, $value);
|
$this->setAttr($key, $value, $data);
|
||||||
}
|
}
|
||||||
if (!empty($where)) {
|
if (!empty($where)) {
|
||||||
$this->isUpdate = true;
|
$this->isUpdate = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user