mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进聚合模型save方法返回值
This commit is contained in:
@@ -209,7 +209,9 @@ class Merge extends Model
|
|||||||
// 处理关联模型数据
|
// 处理关联模型数据
|
||||||
$data = $this->parseData($name, $this->data);
|
$data = $this->parseData($name, $this->data);
|
||||||
$query = clone $db;
|
$query = clone $db;
|
||||||
$query->table($table)->strict(false)->where($this->fk, $this->data[$this->getPk()])->update($data);
|
if ($query->table($table)->strict(false)->where($this->fk, $this->data[$this->getPk()])->update($data)) {
|
||||||
|
$result = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 新增回调
|
// 新增回调
|
||||||
$this->trigger('after_update', $this);
|
$this->trigger('after_update', $this);
|
||||||
|
|||||||
Reference in New Issue
Block a user