Olingo Odata v2 Client Ignore Metadata Changes

I am having problems with the Olingo Odata v2 client library. We save the metadata file in our backend and read it from there, and do not get it every time from the server due to performance. But if the server changes the data structure (for example, adds a new field), the metal call is:

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

will be thrown in 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 the new property added later. Is there any switch to ignore such changes and analyze only known properties?

+4
source share

Source: https://habr.com/ru/post/1667848/


All Articles