You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to increment a field: user.increment({ lastCheckingEmailSendingNumber: 1 });
The increment operation does not work. And I get this error:
error.message: "column "0" of relation "User" does not exist"
error.sql: "UPDATE "User" SET "lastCheckingEmailSendingNumber"="lastCheckingEmailSendingNumber"+ 1,"0"='id',"1"='email',"2"='firstName',"3"='lastName',"4"='phoneNumber',"5"='birthdate',"6"='nationalId' WHERE "id" = 1 RETURNING *"
I don't understand where this part "0"='id',"1"='email',"2"='firstName',"3"='lastName',"4"='phoneNumber',"5"='birthdate',"6"='nationalId'
comes from, even though emai, firstName, ... are columns in User Table !?
Please use Github Issue Tracker only for reporting bugs, requesting new features or discussions. Ask questions on Stackoverflow sequelize.js tag or Slack. While I would like to help answer any questions but it still take too much time.
If you are reporting a bug please isolate it as SSCCE, present it nicely and follow issue template. This will help maintainers and contributors understand your issue quickly.
If you are requesting a feature spend some time to properly present your use case with some examples, current and expected outcome.
@fareshan I am not closing issues randomly, I see nothing in your issue report that could help me reproduce this issue. If you want to report an issue or seeking help, atleast try to present a proper example or even better a SSCCE
@lessu That was a year ago. I don't remember how I fixed it. But I just looked to the code and I see that I am using user.increment("lastCheckingEmailSendingNumber", { by: 1 }); instead of user.increment({ lastCheckingEmailSendingNumber: 1 });
So I fixed it with this change or by updating Sequelize.
Activity
kayorl commentedon Jul 3, 2018
same problem.
sushantdhiman commentedon Jul 3, 2018
Please use Github Issue Tracker only for reporting bugs, requesting new features or discussions. Ask questions on Stackoverflow sequelize.js tag or Slack. While I would like to help answer any questions but it still take too much time.
If you are reporting a bug please isolate it as SSCCE, present it nicely and follow issue template. This will help maintainers and contributors understand your issue quickly.
If you are requesting a feature spend some time to properly present your use case with some examples, current and expected outcome.
( What is SSCCE ? You can find template for Sequelize here )
A few good example of SSCCE
removeAttribute('id')results inundefined: nulldata value #7318 (comment)fareshan commentedon Jul 3, 2018
@sushantdhiman
It is a bug.
And I followed the template.
sushantdhiman commentedon Jul 4, 2018
@fareshan I am not closing issues randomly, I see nothing in your issue report that could help me reproduce this issue. If you want to report an issue or seeking help, atleast try to present a proper example or even better a SSCCE
lessu commentedon May 7, 2019
It seems it have something to do with DefaultScope.attributes.exclude.
after removed
exclude,no error shows any morefareshan commentedon May 8, 2019
@lessu That was a year ago. I don't remember how I fixed it. But I just looked to the code and I see that I am using
user.increment("lastCheckingEmailSendingNumber", { by: 1 });instead ofuser.increment({ lastCheckingEmailSendingNumber: 1 });So I fixed it with this change or by updating Sequelize.
And Thanks for your help.