amianthusOriginal post
Web Developer
Suppose I have the database: Books -> Chapters -> Pages
And I want to be able to delete a book's chapter, and then cascade the pages in that chapter along side it but NOT the other way,
If I delete a page i do not want it to delete the chapter it was related to.
Right now I have it setup as on the Chapter it has a one way relation to pages that is on cascade mode, and then on Pages it has another one way relation to Chapters that is on null delete mode
Is this a good idea? I wanted to avoid two-way because it would cascade bidirectionally
Summary
Developers just need to set up a one-way relation from Chapter to Pages with cascade mode and another one-way relation from Pages to Chapter with null delete mode in order to achieve the desired cascade behavior. This setup allows for cascading pages when deleting a chapter without affecting the relationship in the opposite direction.