version of EntityDevelper = 2.80.143
Executed following sequence of steps in ED.
Created model from database selecting tables TSpecification, TProduct, TItem and TProductItem. Tables TProduct (key productId) and TItem (key itemId) have a 0.1 to 1 relationship with table TSpecification (key specId).
Tables TProduct and TItem have a FK (1 to many) relation with table TProductItem. TProductItem acts as a cross-reference table between TProduct and TItem.
The Entity model validates correctly at this point.
Now We want class Specification to become base class for Product and Item entities.
So we add "Table per Type inheritance" and define Specification as abstract. We also remove the EntityProperties productId from Product and itemId from Item. Then on Product and Item we need to re-add the mapping between column SpecId and property SpecId.
After removing the 0.1 associations between Product and Specification and between Item and Specification the entityModel does not validate. It gives error "No mapping specified for the following EntitySet/AssociationSet - Product_ProductItemSet" (same error on Item_ProductItemSet).
When you open the Association Editor on e.g. association Product_ProductItem you can see that the Referential Constraint properties are no longer defined and blanked out. You can re-select these (Product property = SpecId and ProductItem propery = ProductSpecId) but when you click on the OK button nothing happens or you get a fatal error to restart Entity Developer.
The way to make it work is to open up the edml file with a text editor and add the ReferentialConstraint on the Association name Product_ProductItem manually. Save and reopening the model in ED validates with no error.
Also you can initially not add TProductItem to the model and first define the inheritance tree. Once inheritance is defined you can add TProductItem and the model will validate with no error.
Doing the same set of operations in VS-2010 EF designer did not give an issue. I also tried to delete and recreate the association in the ED but I got an exception "Object reference not set to an instance of an object".
Issue to define Referential constraints on association
This problem is fixed in the latest 6.0.10 Beta build of dotConnect for MySQL.
Please notify us if anything goes wrong.
Please notify us if anything goes wrong.