This commit is contained in:
2021-02-25 18:26:15 +08:00
parent 79cc8fce92
commit 20ee6f6b0c
2 changed files with 4 additions and 19 deletions
+2 -2
View File
@@ -457,7 +457,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
* @return $this|bool
* @throws Exception
*/
private function update($fields, $condition, $param): bool|static
private function updateInternal($fields, $condition, $param): bool|static
{
if (empty($param)) {
return true;
@@ -509,7 +509,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
[$change, $condition, $fields] = $this->filtration_and_separation();
if (!$this->isNewExample) {
return $this->update($fields, $condition, $change);
return $this->updateInternal($fields, $condition, $change);
}
return $this->insert($change, $fields);
}