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
michaelwermeester opened this Issue Feb 2, 2016 · 2 comments

Comments

Projects
None yet
4 participants
@michaelwermeester

michaelwermeester commented Feb 2, 2016

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.)

@michaelwermeester michaelwermeester changed the title from $count value not correct when $expand is used to $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

@lewischeng-ms lewischeng-ms added in-progress and removed ready labels Mar 11, 2016

@chinadragon0515

This comment has been minimized.

Contributor

chinadragon0515 commented Mar 15, 2016

Fixed with 7d05297, close the issue.

@michaelwermeester

This comment has been minimized.

michaelwermeester commented Jun 2, 2016

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment