If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Cascade deletion of referral tables
Hello,
I've a 1:1 relationship between tables A and B 1:n relationship between tables B and C 1:1 relationship between tables C and D I set up cascade deletion for all relationships. Now, by deleting an entry out of table A, I would expect that all related entries out of B,C and D will be deleted too. Strange enough, by deleting an entry out of B, all related entries out of C will be deleted. But table D remains untouched. Does cascade deletion work for 1:n relationships only? Thank you for your help! Ralf |
#2
|
|||
|
|||
Cascade deletion of referral tables
Hi Ralf,
It works fine for me. That is until I experimented with changing the direction of the relationship between C and D. If you drag the lines from C to D it works because C is then the parent of D. If you reverse it, dragging the lines from D to C, D becomes the parent of C. In which case a deletion of the child will not cascade up to the deletion of the parent. You can double-check what you did by double-clicking on one of the lines. The parent is shown on the left side and the child on the right side. Hope that helps, Clifford Bass "Ralf" wrote: Hello, I've a 1:1 relationship between tables A and B 1:n relationship between tables B and C 1:1 relationship between tables C and D I set up cascade deletion for all relationships. Now, by deleting an entry out of table A, I would expect that all related entries out of B,C and D will be deleted too. Strange enough, by deleting an entry out of B, all related entries out of C will be deleted. But table D remains untouched. Does cascade deletion work for 1:n relationships only? Thank you for your help! Ralf |
Thread Tools | |
Display Modes | |
|
|