From 68baca033a84875289ed0efeb37eb139f4373f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 17 Dec 2020 16:40:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Database/Base/BaseActiveRecord.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();