mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
修正保存的时候 主键更改的问题~
This commit is contained in:
@@ -202,6 +202,7 @@ class Model
|
|||||||
if (!empty($this->data)) {
|
if (!empty($this->data)) {
|
||||||
// 没有传递数据,获取当前数据对象的值
|
// 没有传递数据,获取当前数据对象的值
|
||||||
$data = $this->data;
|
$data = $this->data;
|
||||||
|
$find = true;
|
||||||
// 重置数据
|
// 重置数据
|
||||||
$this->data = [];
|
$this->data = [];
|
||||||
} else {
|
} else {
|
||||||
@@ -219,7 +220,7 @@ class Model
|
|||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
// 没有数据变化
|
// 没有数据变化
|
||||||
return [];
|
return [];
|
||||||
} else {
|
} elseif (!empty($find)) {
|
||||||
// 更新操作保留主键信息
|
// 更新操作保留主键信息
|
||||||
$pk = $this->getPk();
|
$pk = $this->getPk();
|
||||||
if (is_array($pk)) {
|
if (is_array($pk)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user