4

I'vve problems with the Olingo Odata v2 Client library. We save the metadata file in our backend and read it from there instead of getting it every time from server because of performance. But if server changes the structure of data (e.g. adding a new field) the methold call:

ODataFeed feed = EntityProvider.readFeed( contentType,
        entityContainer.getEntitySet( entitySetName ), content,
        EntityProviderReadProperties.init( ).build( ) );

will run into an Exception:

org.apache.olingo.odata2.api.ep.EntityProviderException: Illegal argument for method call with message 'NewModel2'.
at org.apache.olingo.odata2.core.ep.consumer.JsonEntryConsumer.readNavigationProperty(JsonEntryConsumer.java:279)
at org.apache.olingo.odata2.core.ep.consumer.JsonEntryConsumer.handleName(JsonEntryConsumer.java:178)

where NewModel2 is a new property added later. Is there any switch to ignore such changes and parse only known properties?

guerilla
  • 405
  • 1
  • 4
  • 12

0 Answers0