I am sorry you are still experiencing issues.
The error appears only when the model on your side contains a persistent class without a primary key property. Usually, such a scenario occurs, when the model contains views (in addition to the tables). Both the tables and the views from the database are mapped to persistent classes from Data Access perspective, but since the views do not have primary keys in the database, their corresponding persistent classes have no primary key properties.
For better understanding of the situation, you can take a look of the view-example.png
screenshot. Note that TableId in MyTable is marked as a primary key, while TableId in MyView is not. For your convenience and for an easier way to find such cases, our validation framework will display both an error and a warning in Error List.
In this connection, I strongly recommend to you to review the content of Error List
for such errors and warnings.
To nominate a given property for a primary key, you need to select it, and to set the Identity
property to True
, as demonstrated on view-primary-key.png
Once you do that, you need to save (Ctrl + S) the model before running the application for a test.
I hope this helps. Let us know, if you are still experiencing the error.
OpenAccess ORM is now Telerik Data Access
. For more information on the new names, please, check out the Telerik Product Map