[ 
https://issues.apache.org/jira/browse/OLINGO-890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Frederik Zimmer updated OLINGO-890:
-----------------------------------
    Attachment: OLINGO890-expanding-to-a-contained-entity-set-result.patch

Attached a patch for alternative 2. The returned EntitySet can only be used to 
read the entities. Other methods result in a UnsupportedOperationException

> Client-Proxy: expanding to a contained entity set results in an error
> ---------------------------------------------------------------------
>
>                 Key: OLINGO-890
>                 URL: https://issues.apache.org/jira/browse/OLINGO-890
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-ext
>            Reporter: Frederik Zimmer
>         Attachments: 
> OLINGO890-expanding-to-a-contained-entity-set-result.patch
>
>
> Expanding a navigation property which navigates to a contained entity set 
> results in an exception when accessing the navigation property.
> AbstractStructuredInvocationHandler assumes that when a ClientInlineEntitySet 
> is retrieved from the server that the navigation property will return an 
> EntityCollection, but for contained entity sets the navigation property will 
> return an AbstractEntitySet.
> I see two possibilities:
> 1. The user has to create a second getter for the navigation property which 
> returns an EntityCollection. The drawback is that the caller has to know how 
> the entity was retrieved and then call the appropriate getter.
> 2. The returned AbstractEntitySet will contain the inline retrieved entities. 
> Then there is the questions how some methods of AbstractEntitySet behave. At 
> least some of the methods like count or execute should not make a server 
> request but operate on the already retrieved collection



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to