Skip to content
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

$count value not correct when $expand is used with $top #287

Closed
mwermeester opened this issue Feb 2, 2016 · 2 comments
Closed

$count value not correct when $expand is used with $top #287

mwermeester opened this issue Feb 2, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@mwermeester
Copy link

When $expand is used in a query that contains a $count=true and $top query option, then the returned count value is incorrect:

http://host/odata/Products?$expand=ProductType&$top=10&$count=true
=> count = 10

The same query without $expand returns the correct count value:

http://host/odata/Products?$top=10&$count=true
=> count = 9939
(The count equals the total count of products.)

The count query option should ignore any $top or $expand query options and return the total count of results. (See 11.2.5.5 System Query Option $count of the specification.)

@mwermeester mwermeester changed the title $count value not correct when $expand is used $count value not correct when $expand is used with $top Feb 22, 2016
@lewischeng-ms lewischeng-ms added this to the 0.5 milestone Mar 2, 2016
@chinadragon0515 chinadragon0515 self-assigned this Mar 3, 2016
@chinadragon0515
Copy link
Contributor

Fixed with 7d05297, close the issue.

@mwermeester
Copy link
Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants