This question is locked. New answers and comments are not allowed.
Hello,
When I add a view i get an error that there is no primary key. when I select the primary (via the model) key I get an error that it cannot be a key on a nullable column, witch it's not.
So, how can I add the view?
Greetings,
Erik
When I add a view i get an error that there is no primary key. when I select the primary (via the model) key I get an error that it cannot be a key on a nullable column, witch it's not.
So, how can I add the view?
Greetings,
Erik
5 Answers, 1 is accepted
0
Hello Erik,
Normally when you select an identity for a class mapped to a view, the identity property should be mapped to a not-nullable column. This is because the identity should guarantee uniqueness of the objects, which is not possible without at least one not-nullable primary key column. This is a check we perform for each domain class, and if we detect that all columns mapped to the identity members are nullable, the aforementioned error is generated. This error does not prevent your project from building, but is there to warn you that there might be something wrong in the model.
If you are sure that your identity member is capable of providing uniqueness for all records, you can just ignore the error and continue working with your application, there should be no runtime problems because of that.
Kind regards,
Alexander
the Telerik team
Normally when you select an identity for a class mapped to a view, the identity property should be mapped to a not-nullable column. This is because the identity should guarantee uniqueness of the objects, which is not possible without at least one not-nullable primary key column. This is a check we perform for each domain class, and if we detect that all columns mapped to the identity members are nullable, the aforementioned error is generated. This error does not prevent your project from building, but is there to warn you that there might be something wrong in the model.
If you are sure that your identity member is capable of providing uniqueness for all records, you can just ignore the error and continue working with your application, there should be no runtime problems because of that.
Kind regards,
Alexander
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
0
0
Hello Allen,
It seems that the your question in this topic is the same as the one discussed in the The object name 'voa_keygen' is invalid ??? topic. If so, you can kindly find the answer in this post.
I hope this helps.
Regards,
Doroteya
Telerik
It seems that the your question in this topic is the same as the one discussed in the The object name 'voa_keygen' is invalid ??? topic. If so, you can kindly find the answer in this post.
I hope this helps.
Regards,
Doroteya
Telerik
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
0
Allen
Top achievements
Rank 1
answered on 19 Dec 2014, 02:59 AM
Yes,Thank
0
Allen
Top achievements
Rank 1
answered on 19 Dec 2014, 03:00 AM
Yes,Thank