views:

21

answers:

0

Hi All, I have a entity model and on it i have a object with name Person that this object have 1 ti 1 relation with NaturalPerson and LegalPerson. therefore the Person is a abstract class and Naturalperson and LegalPerson inherited from Person, but when i try to add NaturalPerson in DAL i got this error

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.

any idea, or any idea to implement this relationship

related questions