diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index 2182f9e8..911e10c7 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -381,7 +381,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, \ArrayAccess $trance->commit(); $this->setAttributes($param); $this->afterSave($attributes, $param); - $this->refresh(); + $lastId = $this->refresh(); } catch (\Throwable $exception) { $lastId = false; $trance->rollback();