Data Access has been discontinued. Please refer to this page for more information.

The Primary Key Constraint Is Specified On Nullable Column

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 usually occurs in model first scenario when a nullable column from the relational part of the model is specified as a primary key.

Solution

To resolve this error, change the nullability of the column. You can do this by using the Table Editor:

  1. Right-click the entity in Visual Designer and select Edit Table... from the context menu.
  2. In the Table Editor find the primary key column and change the Allow Nulls setting.

If you prefer to use the Validation Dialog, double-click the error in the Error List pane. In the Validation Dialog, change the nullability of the column.

Further References