I got this to work by doing the following:
- Remove all navigation properties between the base and inherited objects.
- Remove the foreign key from the inherited objects, and also remove the property mapping for the foreign key in the inherited objects.
- Delete table mapping in inherited objects.
- Add the generated database parameter for the primary key of the inherited objects (if you use the identifier on the PC).
- Add a base type map to the derived type, and (an important bit) on the map explicitly display each property that does not appear in the base class / table. On the map, also map the derived type to the derived type table.
That should pretty much do it. A link to an example solution in EF β RIA β Silverlight, which also shows a workaround for a property with the same name in the base and derived types (the solution is essentially simple for renaming the property to any base type or derived types).
http://dotnetdavis.com/upload/content/source.zip
source share