The Table Of The Derived Type Must Be The Same As The Table Of The Base Type

This article is relevant to entity models that utilize the deprecated Visual Studio integration of Telerik Data Access. The current documentation of the Data Access framework is available here.

This error occurs when two or more classes that participate in flat inheritance hierarchy are mapped to different tables. With flat mapping, fields from the subclasses are mapped to a superclass table. Flat mapping is the simplest and is usually the fastest option. In Flat mapping, the entire class hierarchy is persisted to a single table. That includes everything from an interface/abstract class at the top, all the way down to implementation classes at the bottom.

Solution

To resolve this error, either map the derived type to the base type's table or change the inheritance strategy to vertical.

To map the derived type to the base type's table:

  1. Double-click the warning to open the Validation Dialog.
  2. Apply the automatic fix for mapping the derived type to the table of the base type.

To change the inheritance strategy to vertical:

  1. Double-click the warning to open the Validation Dialog.
  2. Apply the automatic fix for changing the inheritance strategy.

Further References