Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1307

OData V4 requests for property and navigationproperty values of complexTypes that are not included in the selected items are ignored

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Blocker
    • Resolution: Unresolved
    • Affects Version/s: (Java) V4 4.4.0
    • Fix Version/s: (Java) V4 4.8.0
    • Component/s: odata4-server
    • Labels:
      None

      Description

      URL Request

      Unsuccessful:

      Employee('NWD~ContractEmployee-1')?$expand=employer/contractEmployer($select=label,subjectId)

      Successful:

      Employee('NWD~ContractEmployee-1')?$select=employer&$expand=employer/contractEmployer($select=label,subjectId)

      Steps to reproduce the problem:
      The OData model contains a complexType, with navigationProperties as values:

       <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>
      

       

      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)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              peterlawrence Peter Lawrence
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: