A referential integrity constraint violation occurred: A primary key property that is a part of referential integrity constraint ...

A referential integrity constraint violation occurred: A primary key property that is a part of referential integrity constraint cannot be changed when the dependent object is Unchanged unless it is being set to the association's principal object. The principal object must be tracked and not marked for deletion.