When I delete the “event” record via the default GUI function, Preside asks me what to do wiht the blocking records in “session”. No info about the other two relations and the m:n records are still there. The ondelete option has no effect.
Question: Shouldn’t the related records for the m:n fields be deleted also?
In the session table, presumably there is a many-to-one required field. Required relationships here will dictate that we prompt for deletion. If not required, we would just update and set NULL when the related record is deleted.
By default we auto cascade delete many-to-many relationships and do not prompt for deletion on them.
On any many-to-one relationship, you can define ondelete behaviour. The default for required fields is “error” and the options are:
“error” (default for required relationship props)
“cascade” (default for many-to-many auto relationship records)
“set-null” (default for non-required relationship props)
Select data views cannot be considered here as they are not clearly defined relationships that we can necessarily know how to block / or not.