[
https://issues.apache.org/jira/browse/OLINGO-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16029570#comment-16029570
]
Frederik Zimmer commented on OLINGO-1017:
-----------------------------------------
My testcase still doesn't work, but that is now a bug in the client-proxy
project which ignores the type on the entity that is now correctly set, so I'm
closing this bug.
Thanks,
Frederik
> odata.type ignored on expanded entities
> ---------------------------------------
>
> Key: OLINGO-1017
> URL: https://issues.apache.org/jira/browse/OLINGO-1017
> Project: Olingo
> Issue Type: Bug
> Components: odata4-client
> Affects Versions: (Java) V4 4.2.0
> Reporter: Frederik Zimmer
>
> If an expanded entity contains @odata.type metadata it is removed by the
> client in the JsonDeserializer.
> The problem is that expanded entities are parsed as
> ValueType.COLLECTION_COMPLEX. In method fromCollection the odata.type
> annotation is simply ignored by
> if (child.has(Constants.JSON_TYPE)) {
> ((ObjectNode) child).remove(Constants.JSON_TYPE);
> }
> as there is no method to set the type of an item in a complex collection.
> The problem is that we have Valuable but the item in a collection is not a
> Valuable. They should be of type Valuable too. Maybe something like
> ItemValuable.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)