[
https://issues.apache.org/jira/browse/OLINGO-1307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Peter Lawrence updated OLINGO-1307:
-----------------------------------
Description:
*URL Request*
Unsuccessful:
{code:java}
Employee('NWD~ContractEmployee-1')?$expand=employer/contractEmployer($select=label,subjectId){code}
Successful:
{code:java}
Employee('NWD~ContractEmployee-1')?$select=employer&$expand=employer/contractEmployer($select=label,subjectId){code}
*Steps to reproduce the problem:*
The OData model contains a complexType, with navigationProperties as values:
{code:java}
<EntityType Name="Employee" OpenType="true">
<Key>
<PropertyRef Name="subjectId"/>
</Key>
<Property Name="subjectId" Type="Edm.String" Nullable="false"/>
...
<Property Name="employer" Type="northwind.employer"/>
...
</EntityType>
<ComplexType Name="employer">
<NavigationProperty Name="contractEmployer"
Type="Collection(northwind.Shipper)"/>
<NavigationProperty Name="parttimeEmployer"
Type="Collection(northwind.Supplier)"/>
</ComplexType>
{code}
*Other information*
This was raised originally with the OpenUI5 project as it was thought that the
$select should have been included in the request. However they have responded
saying it is indeed not necessary according to the standard:
[https://github.com/SAP/openui5/issues/2235#issuecomment-428106366])
was:
*URL Request*
Unsuccessful:
{code:java}
Employee('NWD~ContractEmployee-1')?$expand=employer/contractEmployer($select=label,subjectId){code}
Successful:
{code:java}
Employee('NWD~ContractEmployee-1')?$select=employer&$expand=employer/contractEmployer($select=label,subjectId){code}
*Steps to reproduce the problem:*
The OData model contains a complexType, with navigationProperties as values:
{code:java}
<EntityType Name="Employee" OpenType="true">
<Key>
<PropertyRef Name="subjectId"/>
</Key>
<Property Name="subjectId" Type="Edm.String" Nullable="false"/>
...
<Property Name="employer" Type="northwind.employer"/>
...
</EntityType>
<ComplexType Name="employer">
<NavigationProperty Name="contractEmployer"
Type="Collection(northwind.Shipper)"/>
<NavigationProperty Name="parttimeEmployer"
Type="Collection(northwind.Supplier)"/>
</ComplexType>
{code}
*Other information*
This was raised originally with the OpenUI5 project as it was thought that the
$select should have been included in the request. However they have responded
saying it is indeed not necessary according to the
standard:([https://github.com/SAP/openui5/issues/2235#issuecomment-428106366])
> OData V4 requests for property and navigationproperty values of complexTypes
> that are not included in the selected items are ignored
> ------------------------------------------------------------------------------------------------------------------------------------
>
> Key: OLINGO-1307
> URL: https://issues.apache.org/jira/browse/OLINGO-1307
> Project: Olingo
> Issue Type: Bug
> Components: odata4-server
> Affects Versions: (Java) V4 4.4.0
> Reporter: Peter Lawrence
> Priority: Major
>
> *URL Request*
> Unsuccessful:
> {code:java}
> Employee('NWD~ContractEmployee-1')?$expand=employer/contractEmployer($select=label,subjectId){code}
> Successful:
> {code:java}
> Employee('NWD~ContractEmployee-1')?$select=employer&$expand=employer/contractEmployer($select=label,subjectId){code}
> *Steps to reproduce the problem:*
> The OData model contains a complexType, with navigationProperties as values:
> {code:java}
> <EntityType Name="Employee" OpenType="true">
> <Key>
> <PropertyRef Name="subjectId"/>
> </Key>
> <Property Name="subjectId" Type="Edm.String" Nullable="false"/>
> ...
> <Property Name="employer" Type="northwind.employer"/>
> ...
> </EntityType>
> <ComplexType Name="employer">
> <NavigationProperty Name="contractEmployer"
> Type="Collection(northwind.Shipper)"/>
> <NavigationProperty Name="parttimeEmployer"
> Type="Collection(northwind.Supplier)"/>
> </ComplexType>
> {code}
>
> *Other information*
> This was raised originally with the OpenUI5 project as it was thought that
> the $select should have been included in the request. However they have
> responded saying it is indeed not necessary according to the standard:
> [https://github.com/SAP/openui5/issues/2235#issuecomment-428106366])
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)