-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$select-ing non-key properties inside $expand of contained entity with odata.metadata=full fails despite being autoselected #1265
Comments
I have performed a few tests to replicate this issue. Using TripPin service:
The query that is not working is when, for example, trying to select property (other than key/id) of navigation property that has its "ContainsTarget" attribute set to true. Example of TripPin service endpoint that will cause the above exception is:
Header: However, the above query will give me the correct data when used with header For example: Header: I am still looking into this more |
@WanjohiSammy yes, that is correct, as I wrote above, this only happens for contained entities (navigation properties with |
Assemblies affected
ASP.NET Core OData 8.2.4
Describe the bug
$expand
ing a contained navigation and$select
ing other properties except the keys throws:Reproduce steps
A GET request to:
with header:
Throws:
Data Model
EDM (CSDL) Model
Additional context
From the resulting query it looks like the key properties are autoselected as they should but they are not being used.
If I explicitly select the key, the results are correctly returned
The text was updated successfully, but these errors were encountered: