olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramya (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (OLINGO-1231) Serializer for complex collection properties does not respect $select
Date Wed, 21 Feb 2018 04:54:00 GMT

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

Ramya resolved OLINGO-1231.
---------------------------
    Resolution: Fixed

> Serializer for complex collection properties does not respect $select
> ---------------------------------------------------------------------
>
>                 Key: OLINGO-1231
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1231
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-server
>    Affects Versions: (Java) V4 4.4.0
>            Reporter: Oliver Grande
>            Priority: Major
>              Labels: patch
>
> I have an entity type that contains a complex collection property:
>  
> {code:xml}
> <EntityType Name="Person">
>   <Property Name="BirthDay" Type="Edm.Date"/>
>   <Property Name="LastName" Type="Edm.String" MaxLength="255"/>
>   <Property Name="FirstName" Type="Edm.String" MaxLength="255"/>
>   <Property Name="InhouseAddress" Type="Collection(dummy.InhouseAddress)">
> {code}
>  
> Now I can try to restrict the returned columns using $select:
>  
> {code:java}
> .../Persons('99')/InhouseAddress?$select=Building,TaskID{code}
> The serializer (JSON as well as XML) do not respect the $select and fills all not retrieved
properties with null: 
> {code:xml}
> <m:value m:type="#Collection(dummy.InhouseAddress)" m:context="$metadata#Persons/InhouseAddress">
> <m:element>
>    <d:RoomNumber m:null="true"/>
>    <d:Floor m:null="true"/>
>    <d:TaskID>DEV</d:TaskID>
>    <d:Building>1</d:Building>
> </m:element>
> </m:value>
> {code}
>  
>  It looks like this is because _ODataXmlSerializer.complexCollection_ sets the parameter
selectedPaths to _null_ when calling writeComplexValue
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message