[
https://issues.apache.org/jira/browse/OLINGO-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14362759#comment-14362759
]
Michael Bolz commented on OLINGO-592:
-------------------------------------
Hi [~freds],
the URL you posted is not valid.
See for valid {{$count}} URLs the [OData V4
specification|http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part2-url-conventions/odata-v4.0-errata02-os-part2-url-conventions-complete.html#_Toc405999462].
However you have the possibility to get the count as {{odata.count}} value in
the response by adding {{$count=true}} (e.g.
http://localhost:8080/odata-server-sample/cars.svc/Cars/?$count=true&$filter=Price%20eq%201000
).
Kind regards,
Michael
PS: You can also try with another OData Sample Service:
http://services.odata.org/V4/(S(qvx0f4gpdzvegedocxrdpzh2))/TripPinServiceRW/People/$count?$filter=FirstName%20eq%20%27Scott%27
and a valid *odata.count* value:
http://services.odata.org/V4/(S(qvx0f4gpdzvegedocxrdpzh2))/TripPinServiceRW/People/?$count=true&$filter=FirstName%20eq%20%27Scott%27
> URL processor fails to get columns from entity
> ----------------------------------------------
>
> Key: OLINGO-592
> URL: https://issues.apache.org/jira/browse/OLINGO-592
> Project: Olingo
> Issue Type: Bug
> Components: odata4-server
> Affects Versions: (Java) V4 4.0.0-beta-02
> Reporter: Frederic Souchu
> Assignee: Michael Bolz
>
> How to reproduce:
> - add CountEntityCollectionProcessor to Cars producer sample
> - navigate to:
> http://localhost:8080/odata-server-sample/cars.svc/Cars/$count?$filter=Price
> eq 1000
> The URI parser returns:
> {code}
> {"error":{"code":null,"message":"The key value 'Price' is invalid."}}
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)