Sequelize.js delete query?
Is there a way to write a delete/deleteAll query like findAll?
For example I want to do something like this (assuming MyModel is a Sequelize model...):
MyModel.deleteAll({ where: ['some_field != ?', something] })
.on('success', function() { /* ... */ });
sequelize table without column 'id'
i have the following sequelize definition of a table:
AcademyModule = sequelize.define('academy_module', {
academy_id: DataTypes.INTEGER,
module_id: DataTypes.INTEGER,
module_module_type_id: DataTypes.INTEGER,
sort_number: DataTypes.INTEGER,
requirements_id: DataTypes.INTEGER
}, {
freezeTableName: true});
As you …