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
{{ message }}
Repository navigation
Trying to increment value with Model Class generates wrong SQL #10411
The query is almost correct but sequelize adds model fields into the query.
UPDATE `links` SET `hitCount`=`hitCount`+ 1,`0`='id',`1`='name',`2`='originalUrl',`3`='code',`4`='type',`5`='userId',`6`='opengraph',`7`='shortUrl',`8`='createdAt',`9`='updatedAt' WHERE `id` = 40
Dialect: mysql Dialect version: 1.6.4 Database version: MySQL 5.7.25-0ubuntu0.18.04.2 - (Ubuntu) Sequelize version: 4.42.0 Tested with latest release: YES (4.42.0)
Activity
sushantdhiman commentedon Feb 16, 2019
Are you using any scopes?
prionkor commentedon Feb 16, 2019
No, I have added my full model code below.
sushantdhiman commentedon Feb 17, 2019
Problem is with
Linkso please include that as wellprionkor commentedon Feb 17, 2019
Hello, find the
Linkmodel belowlessu commentedon May 7, 2019
+1
same error