I am trying to make Entity Framework inheritance between two tables.
The parent:
ParentTable
Id: int primary key
CustomAttribute: int
The Child:
ChilTable
Id: int primary key (not the same one as the parent, Child specific Id)
TCId: int foreign key to parent
SomeInformation: String
For some reasons I want to keep naming “Id” the primary key of both the ParentTable and the ChildTable. That should not bother EntityFramwork as I created a custom property with another name “CId” for the child Table:

And the Child1 table mapping is the following:

But when I “Validate” the model, VS2010 says…:
Error 3002: Problem in mapping fragments starting at line 103:Potential runtime violation of table Child1's keys (Child1.Id): Columns (Child1.Id) are mapped to EntitySet Parents's properties (Parents.CId) on the conceptual side but they do not form the EntitySet's key properties (Parents.Id).
Basically, I understand that Entity Framework sees a problem in the fact we map a table’s primary key to a property that’s not the key of the Entity but then how are we supposed to use inheritance?
IS inheritance only allowed when there is no primary key in the “Child” table? Should I but my primary key as “simple key”?
Thanks in advance…
EF expects the child’s
IdPK to also be a FK to the parent. SoChild.Idis both a PK and an FK.