From 625c132cb5c56e4c1b92b5f679b121980cf34a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 23 Feb 2021 18:13:17 +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 663800f9..aa79e04e 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -415,7 +415,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess throw new Exception('保存失败.' . $sqlBuilder); } $trance->commit(); - $this->setPrimary($lastId, $param); + $lastId = $this->setPrimary($lastId, $param); $this->event->dispatch(self::AFTER_SAVE, [$attributes, $param]); } catch (\Throwable $exception) {