I’m deleting a record which has a MANY_MANY relation. I need to check the middle table (tblATotblB). If there are some dependencies i had better call $this->addError();
I was trying to make a validator. But first trouble was the scenario name. When i delete a record - model says scenario is ‘update’… (wtf?)
I have to deny the deletion if there are any relative records and i need to say about them.
There is no relatives - just delete.
What is the best way to solve my problem? Is there native yii way to make it?