Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get data from extensible entity using Odata

former_member331791
Discoverer
0 Kudos

We are working on implementing an application using Olingo (2.0.6) , Springboot (1.3.2) and eclipse link(2.5.0).


The application expects entities to be extensible the user should be able to add the columns to the entities in the runtime.
I used the @VirtualAccessMethods as mentioned in the documentation (http://www.eclipse.org/eclipselink/documentation/2.5/solutions/extensible001.htm)
The steps mentioned successfully adds the field to the entity in the metadata and also I'm able to save the data in the database programmatically.

I am facing two issue with the implemention -

Issue 1 - When I try to do a OData GET request on the extended entity I get an error saying the getter method for the field is missing in the entity. Though ,the extension map contains the data fetched from the database but it is not mapped to the field name in the metadata.


    Example --- I added a field 'thebirthplace' in my entity(General_data) mapping to a field EXT_1 in the table. When I make a GET request (localhost:8080/mdm/General_datas) I get the following error
    "org.apache.olingo.odata2.jpa.processor.core.access.data.JPAEntityParser:.mdm.entity.General_data.getThebirthplace(). "


    The question is do we need to do the reverse mapping too . Field name -> attribute name. Or am I missing something?

    Best regards

    • SAP Managed Tags:
    2 REPLIES 2

    former_member467951
    Participant
    0 Kudos

    Does the case matter?

    • SAP Managed Tags:

    0 Kudos

    No , Its a standard camel case notation in which the getter (and setter) are generated.As it is an extensible attribute odata need to understand this and get the attribute using the get/set method defined in eclipselink-orm.xml file..which is not happening

    Best regards

    • SAP Managed Tags: