You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class Foo
{
public int Id { get; set; }
public virtual Foo Parent { get; set; }
public int? ParentId { get; set; }
public virtual ICollection<Foo> Branches { get; set; }
}
Hi! I'm trying to configure a self referenced model to cascade delete when deleting its parent. I have tried configuring in this two ways:
However both configs are throwing Foreign key constraint 'FK_Foo_Foo_ParentId' on table 'Foo' may cause cycles or multiple cascade paths when I try to update the database.
The text was updated successfully, but these errors were encountered:
Hi! I'm trying to configure a self referenced model to cascade delete when deleting its parent. I have tried configuring in this two ways:
However both configs are throwing Foreign key constraint 'FK_Foo_Foo_ParentId' on table 'Foo' may cause cycles or multiple cascade paths when I try to update the database.
The text was updated successfully, but these errors were encountered: