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

Add failing test case for findAndCountAll with a include and where #4016

Merged
merged 1 commit into from Jun 28, 2015

Conversation

2 participants
@davidlanger
Contributor

davidlanger commented Jun 26, 2015

This is a test case for findAndCountAll returning an incorrect value for result.count, as the where statement in the include makes the count() sql function counts all rows instead (3 in this case) of only matching Foos (2 in this case).

See issue #4015

@janmeier janmeier merged commit af6723b into sequelize:master Jun 28, 2015

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details

janmeier added a commit that referenced this pull request Jun 28, 2015

Merge pull request #4016 from davidlanger/findAndCountAll-include-where
Add failing test case for findAndCountAll with a include and where

janmeier added a commit that referenced this pull request Jun 28, 2015

@janmeier

This comment has been minimized.

Member

janmeier commented Jun 28, 2015

Fixed by adding a distinct to the count part when there are any include on the count

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