This commit is contained in:
2021-12-12 04:29:09 +08:00
parent 7eb6151111
commit 76292522e4
+1 -1
View File
@@ -614,7 +614,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
return false; return false;
} }
[$change, $condition, $fields] = $this->separation(); [$change, $condition, $fields] = $this->separation();
if (!$this->isNewExample) { if (!empty($this->_oldAttributes) || !empty($this->getPrimaryValue())) {
return $this->updateInternal($fields, $condition, $change); return $this->updateInternal($fields, $condition, $change);
} }
return $this->insert($change, $fields); return $this->insert($change, $fields);