public function clearAllStoresRelations() { CategoryToStore::model()->deleteAllByAttributes(array('category_id' => $this->category_id)); }