Frederik Zimmer created OLINGO-1257:
---------------------------------------
Summary: Client-Proxy: Inline entity set with contained entities
leads to error
Key: OLINGO-1257
URL: https://issues.apache.org/jira/browse/OLINGO-1257
Project: Olingo
Issue Type: Bug
Components: odata4-ext
Affects Versions: (Java) V4 4.4.0
Reporter: Frederik Zimmer
You retrieve an entity and expand a navigation property which returns an entity
set of a contained entity. If you then retrieve a navigation property on one of
the contained entities you will get a bad request because the URL used to
retrieve the navigation property is invalid.
The reason for that is that in AbstractStructuredInvocationHandler method
retrieveNavigationProperty the targetEntitySetURI is only consturcted by the
static information of the service root and the annotated target entity set of
the navigation property. A contained entity set has no static entity set URL.
It is the canonical URL of the containing entity, followed by the path segment
of the navigation property.
Maybe the entity set URL in the case of a ClientInlineEntitySet can be
constructed from the link of the inline entity set. Something like this:
URI linkURI = link.getLink();
URI.create(getClient().getServiceRoot() + linkURI.toASCIIString())
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)