$select on AutoExpanded values with DisableWhenSelectPresent = true produces empty values
@corranrogue9 is already working on this.
Since Jun 27, 2023.
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
Assemblies affected
ASP.NET Core OData 8.x
Describe the bug
AutoExpanded values are included in every response, even when $select is used on another property. Setting DisableWhenSelectPresent to true on the AutoExpand attribute fixes this behavior, but if the $select is used on an auto-expanded property when this is set to true, it returns an empty value(s).
Reproduce steps
- Set DisableWhenSelectPresent to true on the AutoExpand attribute
- Call odata url with $select={autoExpandedProperty}
Data Model
EDM (CSDL) Model
https://microsoftgraph.visualstudio.com/onboarding/_git/onboarding?path=/reviews/15686-epm-get-permissions-analytics/schema.csdl&version=GBmaster
Request/Response
Expected behavior
For the auto-expanded property to be able to be selected, as well as every other property to be able to be selected without including the auto-expanded property in the response.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Please share your call stack or any error message
Add any other context about the problem here.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.