[ https://issues.apache.org/jira/browse/OLINGO-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16576346#comment-16576346 ]
Bruno Brinatti commented on OLINGO-1118: ---------------------------------------- Is there any workaround for this issue? > 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)