From 89b4e5772618e0c2b580aacb2d30c98ec3f935c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 23 Feb 2022 11:13:18 +0800 Subject: [PATCH] modify plugin name --- Model.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Model.php b/Model.php index a0d3750..cde3599 100644 --- a/Model.php +++ b/Model.php @@ -206,11 +206,15 @@ class Model extends Base\Model public function delete(): bool { $primary = $this->getPrimary(); + var_dump(empty($primary), !$this->hasPrimaryValue()); if (empty($primary) || !$this->hasPrimaryValue()) { return $this->addError("Only primary key operations are supported.", 'mysql'); } + var_dump('beforeDelete', $this->beforeDelete()); if ($this->beforeDelete()) { + var_dump([$primary => $this->getPrimaryValue()]); $result = static::deleteByCondition([$primary => $this->getPrimaryValue()]); + var_dump($result); Coroutine::create(function () use ($result) { $this->afterDelete($result); });