Closed ificator closed 4 years ago
BingAds has this requirement.
Further, we need a compact syntax to represent this. Let's say we have this object:
{
"outerProperty": "foo",
"innerProperty": {
"inner1": "foo",
"inner2": "bah",
"inner3": "baz",
"inner4": "qux"
}
}
We don't want to do $select=innerProperty/inner1,innerProperty/inner2,innerProperty/inner3
.
Instead, it should look like nested expand syntax: $select=innerProperty($select=inner1,inner2,inner3)
@xuzhg Azure Search also has this requirement.
This seems to be a duplicate of https://github.com/OData/WebApi/issues/196 which as been open for a very long time. Any chance there will be traction on this soon?
FYI @robward-ms
Also related: https://github.com/OData/odata.net/issues/513
It would also be nice if there was a capability of filtering collection properties that aren't navigations:
$select=collectionProperty($filter=name%20eq%20'foo')
@xuzhg I propose closing this issue since it is a duplicate of #196. If you agree, please close this.
Say I have a model where a
Inner
complex type is nested within anOuter
complex (or entity) type, so a request without a$select
would return:According to the OData spec I should be able to write a query like
...?$select=outerProperty1,inner/innerProperty2
and have it return:However what we actually get is an
ODataException
with message:Assemblies affected
System.Web.OData
Reproduce steps
$select
statement that references just one of the properties within that complex type.Expected result
The request succeeds, and only the requested property from the complex type is returned.
Actual result
The request fails.
Additional details
Issue #837 mentions this issue, but it seems prudent to track it specifically.