Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Ogee » Unable to get data from extensible entity using Odata (The get request on extended entity gives an error showing getter for field is missing)
Unable to get data from extensible entity using Odata [message #1768665] Fri, 21 July 2017 06:33 Go to next message
Tripti Malviya is currently offline Tripti MalviyaFriend
Messages: 2
Registered: July 2017
Junior Member
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? Also , I did not get the refreshmetadata() in methods available for my EntityManager instance.

Issue 2 I am putting the mapping in the eclipselink-orm.xml file which is static. Is there a way to do this on runtime? So, the user can give a fieldname of his choice and it gets the mapped to the available empty column of the database table.


Could anybody please direct me towards the solution?


Best Regards,
Tripti
Re: Unable to get data from extensible entity using Odata [message #1769654 is a reply to message #1768665] Wed, 02 August 2017 12:38 Go to previous message
Klaus Deissner is currently offline Klaus DeissnerFriend
Messages: 4
Registered: November 2013
Junior Member
Hi Tripti,
This the forum for Eclipse Ogee. I think your issue is related to Apache Olingo. Please refer to http://olingo.apache.org/support.html.
Best regards,
Klaus
Previous Topic:Media flag not exported
Next Topic:Credentials
Goto Forum:
  


Current Time: Fri Sep 21 08:34:21 GMT 2018

Powered by FUDForum. Page generated in 0.01760 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top