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

Michael Bolz resolved OLINGO-229.
---------------------------------

    Resolution: Not a Problem

Hi [~Michele EnergySys],

as far as I know the correct uri literal for an {{Edm.Double}} is {{200.5D}} or 
{{200.5d}} so that you have to add a {{"D"}} at the end of your number. So it 
is also defined in section {{2.2.2 Abstract Type System}} of [MS-OData 
Specification|http://download.microsoft.com/download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F81802D92C/\[MS-ODATA\].pdf]
 (from [http://www.odata.org/documentation/odata-version-2-0/]).

But I have to admit that in your linked 
[documentation|http://www.odata.org/documentation/odata-version-2-0/uri-conventions/]
 no {{"D"}} is required.

Because current Olingo implementation is based on the linked document you have 
to add the additional {{"D"}} and then the filter expression will work.

Kind regards,
Michael

> Support of binary operations for Double properties
> --------------------------------------------------
>
>                 Key: OLINGO-229
>                 URL: https://issues.apache.org/jira/browse/OLINGO-229
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-core
>    Affects Versions: V2 1.2.0
>            Reporter: M Carissimi
>            Assignee: Michael Bolz
>
> Hello, I have an OData service which uses custom built Processor and 
> Provider. Some of my Entities contain properties of type Edm.Double. When I 
> use the binary operators (eq, gt, lt, ge, le) with these attributes they only 
> work if I compare the value to an integer number.
> The following filter query works:
> $filter=WATER gt 200
> where as the following query fails:
> $filter=WATER gt 200.5
> According to the OData 2.0 documentation (section 4.5 of 
> http://www.odata.org/documentation/odata-version-2-0/uri-conventions/) it 
> should be possible to compare a value with a double number. Can you please 
> clarify?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to