mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
改进Model类的save方法
This commit is contained in:
@@ -615,13 +615,15 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
$result = $insertId;
|
$result = $insertId;
|
||||||
}
|
}
|
||||||
// 标记为更新
|
// 标记为更新
|
||||||
$this->isUpdate = true;
|
$this->isUpdate = true;
|
||||||
|
// 清空change
|
||||||
|
$this->change = [];
|
||||||
// 新增回调
|
// 新增回调
|
||||||
$this->trigger('after_insert', $this);
|
$this->trigger('after_insert', $this);
|
||||||
}
|
}
|
||||||
// 写入回调
|
// 写入回调
|
||||||
$this->trigger('after_write', $this);
|
$this->trigger('after_write', $this);
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user