Merry Christmas,
I am looking to find an alternative database design to avoid this ULTRA SAFE error:
Representing the FOREIGN KEY constraint "% 1" in table "% 2" can cause loops or multiple cascading paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION or change other FOREIGN KEY constraints.
If 2 fields of the same table belong to the same FK. For example:
People: {Id, Name, Age, Gender}
FamilyRelative: {PersonId, FamiliarId, Relationship}
FK: FamilyRelative.PersonId ->People.Id ON DELETE CASCADE ON UPDATE CASCADE
FK: FamilyRelative.FamiliarId->People.Id ON DELETE CASCADE ON UPDATE CASCADE
Throws an error in the second FK.
PS: I am testing it in SQL Server 2008R2
source
share