From 6e75fa462b6740144bce264a9d4a1e6fb64757b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 18 Jan 2022 17:24:50 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=94=B9=E5=90=8D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit fdf58326 --- Model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Model.php b/Model.php index b40cc9a..5b80723 100644 --- a/Model.php +++ b/Model.php @@ -112,7 +112,7 @@ class Model extends Base\Model if (empty($attributes)) { return $logger->addError(FIND_OR_CREATE_MESSAGE, 'mysql'); } - Db::beginTransaction(); +// Db::beginTransaction(); /** @var static $select */ $select = static::query()->where($condition)->first(); if (empty($select)) { @@ -120,11 +120,11 @@ class Model extends Base\Model $select->attributes = $attributes; $select->setIsNowExample(true); if (!$select->save()) { - Db::rollback(); +// Db::rollback(); return $logger->addError($select->getLastError(), 'mysql'); } } - Db::commit(); +// Db::commit(); return $select; }