[
https://issues.apache.org/jira/browse/OLINGO-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14275126#comment-14275126
]
Michael Burwig commented on OLINGO-503:
---------------------------------------
OLINGO-499 and OLINGO-503 seem like distinct issues to me. Also, I am still
able to reproduce OLINGO-503, which results in unexpected complex type
serialization.
Another Example:
{code:xml}
<EntityType Name="MyEntityType">
<Property Name="DataFieldCollection" Type="Collection(DataFieldAbstract)"/>
</EntityType>
<ComplexType Name="DataFieldAbstract">
<Property Name="Label" Type="Edm.String"/>
</ComplexType>
<ComplexType Name="DataField" BaseType="DataFieldAbstract">
<Property Name="Value" Type="Edm.String"/>
</ComplexType>
{code}
Unexpectedly, the serializer ignores any properties that are defined for
derived classes of *DataFieldAbstract* when serializing the collection.
> 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)