DELETEALL with criteria and with params


$criteria = new CDbCriteria(array(

                'condition' => $this->filter,

                'params'    => $this->paramsFilter,

                 'with'      => $this->relationFilter

            ));

           

            try {

                $this->success = $this->abstractModel->deleteAll($criteria);

            } catch (Exception $e) {

                $this->success = false;

                $errors        = $this->getErrorMySql($e);

            }



this code not work, because not use with params, like findAll.

what is the best form to make this DELETE work?

I can’t help you much by look at the snippet above but if you trying to delete records based on a condition in a second table try a join


$criteria = new CDbCriteria(array(

    'condition' => $this->filter,

    'params'    => $this->paramsFilter,

    'with'      => $this->relationFilter // you could try doing and join here

));

http://www.yiiframework.com/doc/api/1.1/CDbCriteria#join-detail