question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing where attribute in the options parameter passed to update

See original GitHub issue

I have used recently Sequelize and when i want to update my mysql database i see :

Unhandled rejection Error: Missing where attribute in the options parameter passed to update. at Model.update (E:\Sites\GeoQuizz\node_modules\sequelize\lib\model.js:2396:11) at null.<anonymous> (E:\Sites\GeoQuizz\routes\users.js:182:22) at tryCatcher (E:\Sites\GeoQuizz\node_modules\bluebird\js\main\util.js:26:23) at Promise._settlePromiseFromHandler (E:\Sites\GeoQuizz\node_modules\bluebird\js\main\promise.js:507:31) at Promise._settlePromiseAt (E:\Sites\GeoQuizz\node_modules\bluebird\js\main\promise.js:581:18) at Promise._settlePromises (E:\Sites\GeoQuizz\node_modules\bluebird\js\main\promise.js:697:14) at Async._drainQueue (E:\Sites\GeoQuizz\node_modules\bluebird\js\main\async.js:123:16) at Async._drainQueues (E:\Sites\GeoQuizz\node_modules\bluebird\js\main\async.js:133:10) at Immediate.Async.drainQueues as _onImmediate at processImmediate as _immediateCallback

I use this code :

User.update({ nom: req.body.nom }, { id: user.id });

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

51reactions
mickhansencommented, Nov 14, 2015

User.update({ nom: req.body.nom }, { where: {id: user.id} });

3reactions
apmcodescommented, May 4, 2018

You can try passing empty where: {}

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Missing where attribute in the options parameter passed to ...
But this gives me: "Missing where attribute in the options parameter passed to update". The docs also mention that this usage is deprecated....
Read more >
Missing where attribute in the options parameter ERROR
Missing where attribute in the options parameter ERROR. I am getting an error when I try to use the update code as seen...
Read more >
Missing where attribute in the options parameter - Code Grepper
formularioAssertionError [ERR_ASSERTION ]: Missing where attribute in the options parameter ; 1. var values ; 2. var condition ; 3. options = ;...
Read more >
In sequelize updateattributes method can update only one ...
... have updateAttribute(), using update() will work but you can't pass it an array ... "Missing where attribute in the options parameter passed...
Read more >
How to update table row data with Sequelize - Code example ...
AssertionError [ERR_ASSERTION ]: Missing where attribute in the options parameter. And that's how the update() method works.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found