AL-zami
AL-zami

Reputation: 9066

cascade delete from many to many relationship

i have the following relational database model

enter image description here

Both authors and books table has one to many relationship with book_author table.Also they have cascade delete update relationship.If i delete any entry in authors or books table ,corresponding data from book_author table also gets deleted.But the problem is if i delete an author ,there should be no book in books table of that author.How i can make it so that if i delete an author ,corresponding books of that author will also gets deleted from Books table and vise versa.

Upvotes: 0

Views: 1333

Answers (1)

Sergey S.
Sergey S.

Reputation: 6336

This cannot be done using relationships settings only, you need to add deleting logic to frontend (to After Del Confirm form's event) or, better, create data macro on backend side (After Delete data macro)

Upvotes: 1

Related Questions