You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Ramya (JIRA)" <ji...@apache.org> on 2017/05/09 10:01:04 UTC

[jira] [Commented] (OLINGO-1073) Collections with derived complex types - wrong odata.type

    [ https://issues.apache.org/jira/browse/OLINGO-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16002412#comment-16002412 ] 

Ramya commented on OLINGO-1073:
-------------------------------

Please find the patch file attached where both XML and JSON serializers return the correct odata.type when derived type has a collection of complex values. I have added a method to set the type in ComplexValue class
Please test the fix and get back if this is still an issue.

Regards,
Ramya

> Collections with derived complex types - wrong odata.type
> ---------------------------------------------------------
>
>                 Key: OLINGO-1073
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1073
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-client
>    Affects Versions: (Java) V4 4.3.0
>            Reporter: Frederik Zimmer
>         Attachments: Odata_types.diff
>
>
> When you have a collection of complex types the client knows during serialization only the type of the collection. So when you have complex values of a derived type in the collection they get serialized incorrectly with a odata.type of the collection and not their own derived type.
> The problem is that during the serialization we only have a ComplexValue without type information. The ODataBinderImpl will transform a ClientValue which has correct type information to a ComplexValue without type information. The easiest solution would be propably to add type information to ComplexValue.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)