Cannot create OData WCF Service with Oracles Views

Thread is closed for posting
2 posts, 0 answers
  1. Ben
    Ben avatar
    1 posts
    Member since:
    Jan 2015

    Posted 28 Jan 2015 Link to this post

    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?
  2. Boyan
    Boyan avatar
    100 posts

    Posted 30 Jan 2015 Link to this post

    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.

    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
Back to Top