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

Roman  Vink closed OLINGO-1319.
-------------------------------
    Resolution: Not A Problem

> filter on navigation property rejected by parser
> ------------------------------------------------
>
>                 Key: OLINGO-1319
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1319
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-server
>    Affects Versions: (Java) V4 4.2.0, (Java) V4 4.3.0, (Java) V4 4.4.0
>            Reporter: Roman  Vink
>            Priority: Critical
>
> 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
>  
>  



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

Reply via email to