You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Christian Amend (JIRA)" <ji...@apache.org> on 2016/05/31 10:51:12 UTC

[jira] [Resolved] (OLINGO-962) Filter on Decimal properties having a decimal point does not work.

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

Christian Amend resolved OLINGO-962.
------------------------------------
    Resolution: Not A Problem
      Assignee: Christian Amend

Hi Ramya,

per specification decimal values need to end with a (m) or (M) suffix to be decimals. The error message here is misleading. If you use the value 4.500m it should work. Here the specification part: 
"decimalUriLiteral = decimalLiteral ("M"/"m")"

Best Regards,
Christian

> Filter on Decimal properties having a decimal point does not work.
> ------------------------------------------------------------------
>
>                 Key: OLINGO-962
>                 URL: https://issues.apache.org/jira/browse/OLINGO-962
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-core
>    Affects Versions: V2 2.0.6
>         Environment: Windows
>            Reporter: Ramya
>            Assignee: Christian Amend
>             Fix For: V2 2.0.6
>
>         Attachments: StackTrace.txt
>
>
> The query of the form
> ProductSet?$filter=WeightMeasure eq 4.500 does not work. When the value of the property has a decimal dot separator, the following error is thrown
> "Invalid filter expression: 'WeightMeasure eq 4.500'"
> The detailed stack trace is
> "Caused by: org.apache.olingo.odata2.api.uri.expression.ExpressionParserException: No property "4.500" exists in type "GWSAMPLE_BASIC.Product" at position 18 in "WeightMeasure eq 4.500".
> 	at org.apache.olingo.odata2.core.uri.expression.FilterParserExceptionImpl.createPROPERTY_NAME_NOT_FOUND_IN_TYPE(FilterParserExceptionImpl.java:216)
> 	at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.validateEdmPropertyOfStructuredType(FilterParserImpl.java:509)
> 	at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.validateEdmProperty(FilterParserImpl.java:464)
> 	at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.readElement(FilterParserImpl.java:371)
> 	at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.readElements(FilterParserImpl.java:136)
> 	at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.parseFilterString(FilterParserImpl.java:98)
> 	at org.apache.olingo.odata2.core.uri.UriParserImpl.handleSystemQueryOptionFilter(UriParserImpl.java:681)"
> The metadata shows this property defined for Product Entity
> <Property Name="WeightMeasure" Type="Edm.Decimal" Nullable="true" Precision="13" Scale="3" sap:unit="WeightUnit" sap:label="Weight"/>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)