I have four entities A, B, C, and D.
A has many Bs and Cs.
B has many Ds.
And there is a many-to-many relationship between C and D.
This many-to-many relationship is in a join table exposed to Breeze as an entity CD.
I want to establish a cascading delete so that deleting the first entity in any of the following rows yields that cascading delete.
A -> B -> D -> CD
B -> D -> CD
D -> CD
A -> C -> CD
C -> CD
All the other foreign keys have a cascading delete except for A -> C. Every time I attempt to set this as a cascading delete SQL Server 2012 gives me the following error:
Unable to create relationship 'FK_dbo.C_dbo.A_AId'. Introducing FOREIGN KEY constraint 'FK_dbo.C_dbo.A_AId' on table 'C' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints. Could not create constraint. See previous errors.
How can I resolve this error and get close to what I'm looking for?