I have two tables in my EDMX, I'll call them table A and table B. I would like for table B to be inherited from table A, so A is the base type and B is derived from A. I have set this up in my EDMX file as such by removing the association between the two tables, adding the inheritance and deleting the duplicate columns in B. All fields are mapped properly and I have mapped the insert/update commands to stored procedures. When I run run a test to save changes to B, I get no errors. However, none of the fields in my base table, table A, are updated. And when I try an insert, I get an error saying there is a foreign key violation. When I checked with SQL profiler, I found that only the stored procedure to insert into table B is called. I would need for the insert to table A to happen first, then table B. But this is not happening and my update is not even touching table A. Is there anything special I need to do to make sure that both tables are updated properly and the inserts are done for both (and in the correct order)?
Any tips would be greatly appreciated.
View Complete Post