diff --git a/common/modules/product/models/Category.php b/common/modules/product/models/Category.php index a109e5e..6dd0781 100755 --- a/common/modules/product/models/Category.php +++ b/common/modules/product/models/Category.php @@ -221,7 +221,7 @@ class Category extends \yii\db\ActiveRecord $product->delete(); } } - $this->unlinkAll(ProductCategory::className()); + ProductCategory::deleteAll(['category_id' => $this->category_id]); CategoryName::deleteAll(['category_id' => $this->category_id]); return true; } -- libgit2 0.21.4