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