This is a migrated thread and some comments may be shown as answers.

Cannot create OData WCF Service with Oracles Views

1 Answer 38 Views
Web Services
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ben
Top achievements
Rank 1
Ben asked on 28 Jan 2015, 07:08 PM
I have a very simple EntityModel set up in an rlinq file.  There is one view connected to it with three fields:
ACTKEY: Int32, not nullable, identity = true
ACTCODE: String, not nullable, identity = false
ACTDESC: String, not nullable, identify = false

So ACTKEY is my primary id field, and I believe I have it set up correctly.

When I go to "Add Telerik Data Access Service" and choose a WCF Data Service - OData v3, my view is greyed out (not selectable). Hovering over it gives the message "This Entity type is not compatible with the current service due to: Nullable primary keys are not supported!".

I seem to get the same results with any view that I add, and with any data service type I select.  Does Telerik not support simple views, or is there something I'm missing here?

1 Answer, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 30 Jan 2015, 03:41 PM
Hello Ben,

Views should be supported with the OData v3 services generated by the Telerik Data Access Service wizard. Please note that Telerik Data Access identities the persistent classes by their primary keys so a property (or a group of properties) must be marked as primary key. In order for those keys to be taken into account in the Service Wizard you need to re-save the .rlinq file and re-build the project. 
Could you please confirm that you have used the following work-flow after you have created a domain model:
1. Locate the view in the .rlinq file, select its ACTKEY property, press F4 to open the properties pane and set the Identity to true.
2. Make sure that the .rlinq file is re-save and re-build the project that holds the domain model before running the Service wizard.
3. Select the WCF Data Service - OData v3, press next and the view should be selected.

Please note though that inserts, updates or deletes for views are not supported. In order to do that you could encapsulate the insert, update or delete logic in a stored procedure and then expose the procedure.

I hope this help. Do not hesitate to contact us if the issue continues to persist or if you have any further questions.

Regards,
Boyan
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
Tags
Web Services
Asked by
Ben
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Share this question
or