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
increment shows sql error after use scope query #10719
Labels
Comments
ALiangLiang
added a commit
to ALiangLiang/sequelize
that referenced
this issue
Apr 9, 2019
reproduce: ALiangLiang@be03653 UPDATE `Users` SET `aNumber`=`aNumber`+ 1,`exclude`='age', 'created_at', 'updated_at',
`updatedAt`='1970-01-01 00:00:00' WHERE `id` = 1 |
Same problem in sqlite
|
6 tasks
papb
added
the
status: wip
For issues and PRs. Applied when the PR is not ready yet / when work to close the issue has started.
label
Jan 15, 2020
papb
removed
the
status: wip
For issues and PRs. Applied when the PR is not ready yet / when work to close the issue has started.
label
Jan 21, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What are you doing?
I just want increment field of a model instance after scope query.
see codes below:
bh is name of a scope,defined by code below:
What do you expect to happen?
when query ,i need this scope to exclude some attributes,after query,i just want increment a field of model instance 。but see the sql below,wrong sql generated。
What is actually happening?
very simple code ,but will cause sql errors。because the code above will be translated into sqls like this:
Obviously,the sql is wrong。
Dialect: mysql
__Dialect version:
__Database version:5.6
__Sequelize version: 5.2.12
__Tested with latest release:yes,5.2.12
Note : Your issue may be ignored OR closed by maintainers if it's not tested against latest version OR does not follow issue template.
The text was updated successfully, but these errors were encountered: