Closed jsha closed 9 years ago
✓ Also, per 2.0.0-rc1, "Model.destroy() signature has been changed from (where, options) to (options), options now take a where parameter." There are a few cases that will need to be fixed.
✓ Also, there are a number of places that use includes and refer to the included names that will have to be upcased:
"Model names are now used more verbatim in associations. This means that if you have a model named Task (plural T), or an association specifying { as: 'Task' }, the tasks will be returned as relatedModel.Tasks instead of relatedModel.tasks. For more information and how to mitigate this, see https://github.com/sequelize/sequelize/wiki/Upgrading-to-2.0#inflection-replaces-lingo-and-changes-to-naming-conventions"
✓ "Sequelize now returns promises instead of its custom event emitter from most calls. This affects methods that return multiple values (like findOrCreate or findOrInitialize). If your current callbacks do not accept the 2nd success parameter you might be seeing an array as the first param. Either use .spread() for these methods or add another argument to your callback: .success(instance) -> .success(instance, created)."
✓ "[FEATURE] 1:1 and 1:m marks columns as foreign keys, and sets them to cascade on update and set null on delete. If you are working with an existing DB which does not allow null values, be sure to override those options, or disable them completely by passing constraints: false to your assocation call (M1.belongsTo(M2, { constraints: false}))."
Fixed.
✓ Per the changelog for 2.1.0, this will require replacing all
.success()
with.then()
.