Entity Framework 4 - TPT Inheritance in Features CTP5 (code first): rename foreign key column on inherited table
I'm trying to convert an xml Entity Framework model to Code First (CTP5) one. I have to model a hierarchy which fits quite well the TPT pattern. The only problem I have is that the primary key/foreign key of the "inheriting" table has a different name from the primary key of the base class. These are the relevant fields of the involved tables CREATE TABLE site.Domains ( ID INT NOT NULL PRIMARY KEY, Domain NVARCHAR(128) NOT NULL ) CREATE TABLE site.MainSites ( FKDomainID INT NOT NULL PRIMARY KEY REFERENCES site.Domains(ID) ) CREATE TABLE site.SisterSites ( FKDomainID INT NOT NULL PRIMARY KEY