I use an Entity Framework 4 edmx model that contains two entities having a 1 to 1 relationship and mapped to the same table (table splitting). However, when I add new objects to the context and call SaveChanges(), an exception is thrown that says “A dependent property in a ReferentialConstraint is mapped to a store-generated column. Column: ‘ID’.” Does it mean that I cannot use table splitting on tables that have an auto-generated identity column?
Share
I think I figured it out. The problem was caused by running Create Database from Model wizard after the table-splitting mapping was in place. The wizard reset the mapping, and the two entities became mapped to two different tables instead of one. It looks like table splitting doesn’t play well with Model First development.