Skip to content

fix(app:seed): adding empty where clause for Sequelize destroy calls #944

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

Closed
wants to merge 1 commit into from

Conversation

makearl
Copy link

@makearl makearl commented Apr 23, 2015

Sequelize destroy cannot be called without a where clause
(sequelize/sequelize#3131),
this causes the following error message: Missing where or truncate attribute in the options parameter passed to destroy.

Sequelize destroy cannot be called without a where
 (sequelize/sequelize#3131),
 this causes the following error message: `Missing where or
 truncate attribute in the options parameter passed to destroy.`
@Awk34
Copy link
Member

Awk34 commented Jun 21, 2015

Fixed with #1007

@Awk34 Awk34 closed this Jun 21, 2015
@iamjoyce
Copy link

Can I add a caveat for this fix? The empty where clause is added only if no options are specified.

For example, if my options are {attributes: ["IsActive"]}, destroy will not proceed.
However, if my options were {where: {}, attributes: ["IsActive"]}, destroy will work fine.

I've only tested this for MSSQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants