Open GODBS opened 7 years ago
https://github.com/OData/WebApi/issues/194 https://github.com/OData/odata.net/issues/440 https://github.com/OData/odata.net/issues/298
All these issues are closed however i still can't seem to get it working in my application nor in the example... am i doing something wrong?
If you call ParseSelectAndExpand()
on ODataQueryOptionParser
with a $count
$expand
, you get the error you've seen. It seems at the moment odata.net
is unable to parse such expands.
Does anyone have an update on this? It's still the case with the week old 7.4 beta.
I am trying to do a count on an expand as well and still doesn't seem to be working. Any update on this?
Yeah. Any update? Running into the same here trying to put Odata into productio. Alternatives are adding it to a "Statistics" contained entity with all kinds of counts or actually using OData. Sadly this regression makes it unable to actually with counting navigational properties.
Same here, simple count of navigational properties are not working.
@mikepizzo I kow the team has been working on expanded $count support across the board... I just tried to do an $expand=NavigationCollection/$count and it failed in 7.2.2. Any idea when this will be supported?
Short summary (3-5 sentences) describing the issue.
$count does not seem supported in filter, expand or orderby for navigational properties.
Assemblies affected
OData.NET 7.X
Reproduce steps
http://services.odata.org/V4/TripPinService/People?$orderby=Friends/$count http://services.odata.org/V4/TripPinService/People?$filter=Friends/$count gt 0 http://services.odata.org/V4/TripPinService/People?$expand=Friends/$count
Expected result
What would happen if there wasn't a bug.
You should be able to see the count in the navigational properties according to the following document http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_Toc453752359
Actual result
What is actually happening.
Internal server error & bad request with the following error: "message": "Found system token '$count' in select or expand clause 'Friends/$count'.", "message": "The parent value for a property access of a property '$count' is not a single value. Property access can only be applied to a single value.",