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

fix the bug `findAndCountAll` not working on postgresql. #899

Merged
merged 6 commits into from Sep 16, 2013

Conversation

2 participants
@hackwaly
Contributor

hackwaly commented Sep 12, 2013

copy where array, avoid changed by internal.

fix the bug findAndCountAll not working on postgresql.
copy `where` array, avoid changed by internal.
@janmeier

This comment has been minimized.

Member

janmeier commented Sep 12, 2013

Could you please provide a test case that needs this? This should be fixed by #884 - which is in master, but not npm, so you might need to update to that

@hackwaly

This comment has been minimized.

Contributor

hackwaly commented Sep 13, 2013

I'm sorry for my careless commits.

@janmeier

This comment has been minimized.

Member

janmeier commented Sep 13, 2013

Thanks for the test :)

For some reason travis has not run your commits so I just tried them locally. The same problem is also present for other dialects, so fixing it for postgres only is not enough. I think you should use the optClone method in the count method like ion #884

@hackwaly

This comment has been minimized.

Contributor

hackwaly commented Sep 13, 2013

That's just I want to say.
but, I think it's not best just wrap the caller functions which pass options parameter. Some internal functions has side effect. They may break other internal functions, not only the count or find etc.
These function should not have side effect, they are not control flow or context aware functions.
What do you think about?

wenyuxiang
@hackwaly

This comment has been minimized.

Contributor

hackwaly commented Sep 15, 2013

Is this ok?

janmeier added a commit that referenced this pull request Sep 16, 2013

Merge pull request #899 from hackwaly/master
fix the bug `findAndCountAll` not working on postgresql.

@janmeier janmeier merged commit 5da0c23 into sequelize:master Sep 16, 2013

1 check passed

default The Travis CI build passed
Details
@janmeier

This comment has been minimized.

Member

janmeier commented Sep 16, 2013

Jup, very o.k. This is actually better than the fix in 884 so I removed that again since your PR covers all cases

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