I've a question about deleting records in a table.
My Contao extension consists out of various "child tables" and I was wondering if there is a way of programming to avoid problems with not available "linked" child records in a parrent table.
I had already a look into the ondelete_submit functionality, but this didn't work for me (yet).
The way I see it is that there are 2 options:
- As soon as the command delete is given a check is started to see if the actual (child) record has a relationship with a parent table. If not -> execute delete command, else cancel operation.
- As the DCA form is loaded, for each row is checked on an existing relationship. If available, the the operation option "delete" is blanked out.
So, I was wondering if someone here has some expierence with this issue. If you could then provide me some sample code would be great.
Thanks in advance!
Bookmarks