Skip to content Skip to sidebar Skip to footer

Resolve Cycles And Multiple Cascade Paths

I have a set of tables and am currently trying to set up the correct relationships for the tables. The condensed version is below. Users ID INT NOT NULL Activities ID INT

Solution 1:

SQL Server does not support multiple cascade paths. Your options to work around this limitation are:

  1. write your own logic for dealing with multiple cascade paths (recommended).

  2. change your schema such that multiple cascade paths are not required.

  3. wait for SQL Server to fix this. Don't hold your breath - this has been a limitation for years. See these Connect items:

    a. http://connect.microsoft.com/SQLServer/feedback/details/126159/cascade-updates b. http://connect.microsoft.com/SQLServer/feedback/details/307723/allow-multiple-cascade-paths-for-foreign-key-and-on-dalete-update-cascade

    Notice how they keep saying "we don't have time for this now; we'll consider it for the next release"? This isn't the kind of thing that sells software, because people are satisfied - generally - with coding the logic themselves.

  4. migrate to a database platform that supports multiple cascade paths (sounds like you think you have many options for this, but I don't think you do, and I don't know what you sacrifice by switching, not even counting porting your schema and code).

Post a Comment for "Resolve Cycles And Multiple Cascade Paths"