I have a weird problem:
I have three tables:
- rooms
- contracts
- contracts_rooms
contracts_rooms has two FKs pointing to the ID fields of rooms and contracts. the FK relation for rooms.id has a "restrict" for delete/update.
in grocery crud I make use of the set_relation_n_n function.
I still can can delete a room in my rooms table without any restriction / warning before deletion. also, the entry in contracts_rooms is deleted but there is an orphaned "contracts" record left then.
manipulating the database directly via phpmyadmin gives me the usual "can not update" etc. error due to the constraint.
what is the magic of grocery crud behind that behaviour? ;-) does it remove the record from the junction table first and then removes the "room" record?