This commit is contained in:
2023-08-14 14:03:30 +08:00
parent d42d284f62
commit 08e9211e0e
+1 -1
View File
@@ -193,7 +193,7 @@ class Model extends Base\Model
{
if ($this->beforeDelete()) {
if ($this->hasPrimary()) {
$result = static::deleteByCondition("id = :id", [":id" => $this->getPrimaryValue()]);
$result = static::deleteByCondition("id = ?", [$this->getPrimaryValue()]);
} else {
$result = static::deleteByCondition($this->_attributes);
}