From 366a768e36806f22f27073f38dea6d38e095dae2 Mon Sep 17 00:00:00 2001 From: bim-g Date: Thu, 28 Sep 2023 11:09:07 +0200 Subject: [PATCH] [FIX] ORM Entity : error executing delete method before apply condition. --- src/Core/Orm/EntityModel/Provider/Entity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Orm/EntityModel/Provider/Entity.php b/src/Core/Orm/EntityModel/Provider/Entity.php index 3008652..3fc44f5 100644 --- a/src/Core/Orm/EntityModel/Provider/Entity.php +++ b/src/Core/Orm/EntityModel/Provider/Entity.php @@ -263,10 +263,10 @@ public function delete(): array try { $query = $this->db->delete($this->getTableName()); - $result = $query->result(); if (isset($this->param['where'])) { $query->where($this->param['where']); } + $result = $query->result(); $this->param = []; if ($this->db->error()) { throw new \Exception($this->db->error());