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

filter on navigation property rejected by parser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Not A Problem
    • (Java) V4 4.2.0, (Java) V4 4.3.0, (Java) V4 4.4.0
    • None
    • odata4-server
    • None

    Description

      Here is a simple setup:

       
      EntityType Name="device" OpenType="true">
      <Key>
      <PropertyRef Name="ID"/>
      </Key>
      <Property Name="ID" Type="Edm.Int64" Nullable="false"/>
      <Property Name="Name" Type="Edm.String"/>
       
       
      <NavigationProperty Name="components" Type="Collection(com.im.odata.component)" Partner="device"/>
       
       
       
       
      </EntityType>
       
      <EntityType Name="component" OpenType="true">
      <Key>
      <PropertyRef Name="ID"/>
      </Key>
      <Property Name="ID" Type="Edm.Int64" Nullable="false"/>
      <Property Name="DeviceItemID" Type="Edm.Int32"/>
      <Property Name="Name" Type="Edm.String"/>
       
      <NavigationProperty Name="device" Type="com.im.odata.device" Nullable="false" Partner="components"/>
       
       
       
       
      </EntityType>
       1 to many relationship between device and components.

      a query like   devices?&$filter=components/any(s:DeviceItemID eq 35)  would fail with 

      java.lang.AssertionError: exception: The property 'DeviceItemID', used in a query expression, is not defined in type 'com.im.odata.device'. [HTTP/1.1 400 Bad Request]

      devices?&$filter=components/any(s:ID eq 35) would work fine

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            romanvink Roman Vink
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: