mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
模型saveall方法支持配合isUpdate方法
This commit is contained in:
@@ -1297,7 +1297,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
$auto = true;
|
||||
}
|
||||
foreach ($dataSet as $key => $data) {
|
||||
if (!empty($auto) && isset($data[$pk])) {
|
||||
if ($this->isUpdate || (!empty($auto) && isset($data[$pk]))) {
|
||||
$result[$key] = self::update($data, [], $this->field);
|
||||
} else {
|
||||
$result[$key] = self::create($data, $this->field);
|
||||
|
||||
Reference in New Issue
Block a user