Thank you Fabrizio, it worked. The problem was that idParticipant could not be left blank…
I don’t understand this because I set it in db that it can be NULL…anyway I did $pool->idParticipant=2
just for testing and it works.
No problem about referential integrity because in my real application I don’t have a relationship between Pool and Course.
The structure is different. Anyway now I have a different problem:
It works fine with beforeDelete(), but in my app I don’t want to do a hard delete:
What I want to do is in actionDelete() just change a flag to 1 if user deletes a record:
public function actionDelete($id)
In this case beforeDelete() functionality doesn’t work since I am not using delete().
What can I do?
Thank you in advance.