[
https://issues.apache.org/jira/browse/OLINGO-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14282438#comment-14282438
]
Christian Amend commented on OLINGO-503:
----------------------------------------
Hi Michael,
yes we ignore the derived types in serialization as the type of the collection
is the parent type. Thus we only serialize fields defined in the abstract
parent type.
The feature you are looking for is mixed collections where you can also see
properties which are defined for the derived types. This feature is not
implemented yet and we are still discussing on how this can be achieved. So for
now we only support the functionallity which is currently implemented.
Best Regards,
Christian
> Incorrect JSON-Serialization of Collections of abstract complex Properties
> --------------------------------------------------------------------------
>
> Key: OLINGO-503
> URL: https://issues.apache.org/jira/browse/OLINGO-503
> Project: Olingo
> Issue Type: Bug
> Components: odata4-server
> Affects Versions: V4 4.0.0-beta-01, (Java) V4 4.0.0-beta-02
> Reporter: Michael Burwig
> Assignee: Michael Bolz
> Fix For: (Java) V4 4.0.0-beta-02
>
>
> Affected Method:
> {{org.apache.olingo.server.core.serializer.json.ODataJsonSerializer.entity(...)}}
> Scenario:
> An entity type has a property of the type *Collection(AC)*, where *AC* is an
> abstract complex property type that serves as a base type for various complex
> types *AC_i* (i = 1...n).
> Issue:
> At request time, {{ODataJsonSerializer.entity(...)}} eventually calls
> {{ODataJsonSerializer.writeComplexValue(edmCmplxType, properties)}}
> and iterates over each property that is defined as part of type *AC* but
> ignores any properties that are defined for the actual property
> implementation *AC_i*.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)