This commit is contained in:
2021-03-04 10:32:17 +08:00
parent 96c5957dc8
commit 6e30221cc1
+4
View File
@@ -454,6 +454,8 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
$trance->commit();
$lastId = $this->setPrimary($lastId, $param);
$this->refresh();
$this->event->dispatch(self::AFTER_SAVE, [$attributes, $param]);
} catch (\Throwable $exception) {
$trance->rollback();
@@ -519,6 +521,8 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
$trance->commit();
$this->refresh();
$this->event->dispatch(self::AFTER_SAVE, [$fields, $param]);
return true;