[
https://issues.apache.org/jira/browse/OLINGO-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Archana Rai resolved OLINGO-1118.
---------------------------------
Resolution: Fixed
This issue is fixed now:
https://git-wip-us.apache.org/repos/asf?p=olingo-odata2.git;a=commit;h=39e00568c13b5decc124256ecf8a83fa155f496a
> Filter on Enum field doesn't work
> ---------------------------------
>
> Key: OLINGO-1118
> URL: https://issues.apache.org/jira/browse/OLINGO-1118
> Project: Olingo
> Issue Type: Bug
> Components: odata2-jpa
> Affects Versions: V2 2.0.7
> Reporter: Shankara
> Priority: Major
>
> Hi,
> We've an Enum field for an entity which is shown as Edm.String in metadata.
> When we do a filter on a a field which has Enum as field type it throws an
> error saying cannot cast String to Enum.
> Medata:
> <EntityType Name="ExtendedActivation">
> <Key>
> <PropertyRef Name="ConfigurationType"/>
> <PropertyRef Name="Id"/>
> </Key>
> <Property Name="ConfigurationType" Type="Edm.String" Nullable="false"
> MaxLength="255"/>
> <Property Name="ConfigurationXml" Type="Edm.String" Nullable="false"
> MaxLength="2147483647"/>
> <Property Name="Id" Type="Edm.String" Nullable="false" MaxLength="45"/>
> </EntityType>
> OData Filter Call: <Odata serivce base
> url>//ExtendedActivations?$filter=ConfigurationType eq 'GENERIC_TYPE'
> Exception:
> Internal Exception: java.lang.ClassCastException: Cannot cast class
> java.lang.String to class java.lang.Enum
> Query: ReadAllQuery(referenceClass=ExtendedActivation jpql="SELECT E1 FROM
> ExtendedActivation E1 WHERE (E1.configurationType = 'GENERIC_TYPE')")
> Thanks & Regards
> Shankara G
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)