OData / OData/AspNetCoreOData

Using * and path/to/property($count=true) together in $select fails to return 'odata.count' value for the property

Open
#967 1 comment 0 reactions 1 assignee View on GitHub

@corranrogue9 is already working on this.

Since Jun 27, 2023.

bug
Dominant language
C#
Stars
505
Forks
186
PR merge metrics
No merged PRs in 30d

Description

Assemblies affected
Microsoft.AspNetCore.OData version 8.0.4

Describe the bug
When using below OData query, the return data does NOT have a property to show the count, and all other properties are showing correctly:
catalog/entries?$select=*,microsoft.wufb.deployments.qualityUpdateCatalogEntry/severityInformation/ExploitedCves($count=true)

Expected behavior
When using above ODATA query, the return content should include count value (e.g. "ExploitedCves@odata.count") and all the other properties.

Other thing I noticed is that below OData query works correctly and returns the selected property and its count:
catalog/entries?$select=microsoft.wufb.deployments.qualityUpdateCatalogEntry/severityInformation/ExploitedCves($count=true)
The * is removed from the $select this time.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.