Cascade delete on many-to-many between same table
I'm trying to create a many-to-many relation between the same table in SQL Server. I have one table Object with columns ObjectId and Name . The relation follows these rules: a child can have many parents a parent can have many children ObjectA can be a child of ObjectB and ObjectB can be a child of ObjectA but an object cannot be a direct child of itself So I create a second table ObjectRelation with columns ParentId and ChildId and of course I want these relations to be deleted by cascade. But when I try this in SQL Server I get the error Introducing FOREIGN KEY constraint 'FK_ObjectRelation