c# - Inserting Multiple Inherited Entities Gives - Unable to determine the principal end of the relationship -


i'm using ef5 , i'm having issue can add 1 instance of inherited entity , save successfully, if add 2 or more instances of type, run issue below.

these entities inherited types base type. fkessayitemcontent fk relationship ties type, essayitem, it's base, content.

unable determine principal end of  'tdsmodel.fkessayitemcontent' relationship.  multiple added entities may have same primary key. 

what missing here, such 1 entity insert fine, 2 of them inserted @ once cause problem when using inheritance?

thanks!

i ended answering myself. turns out in addition inheritance relationship, model had association between essayitem , `content'. removing association , maintaining inheritance fixed issue.


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -