- 13 Jun, 2019 2 commits
-
-
Erik Seliger committed
-
* refactor(hooks): remove method aliases for hooks BREAKING CHANGE: In order to streamline API: - All method style add hook functions have been removed in favor of a composition based approach. - Hook names have been removed, you can add and remove them by function reference instead which was supported before. - Another notable change that `this` inside of hooks no longer refers to the the the hook subject, it should not be used. This affects `Model`, `Sequelize` and `Transaction`. #### Composition Before: `MyModel.beforeCreate(...)` After: `MyModel.hooks.add('beforeCreate', ...)` Before: `MyModel.addHook('beforeCreate', ...)` After: `MyModel.hooks.add('beforeCreate', ...)` Before: `MyModel.removeHook('beforeCreate', ...)` After: `MyModel.hooks.remove('beforeCreate', ...)` Before: `transaction.afterCommit(...)` After: `transaction.hooks.add('afterCommit', ...)` #### Names Before: ```js MyModel.addHook('beforeCreate', 'named', fn); MyModel.removeHook('beforeCreate', 'named'); ``` After: ```js MyModel.hooks.add('beforeCreate', fn); MyModel.hooks.remove('beforeCreate', fn); ``` #### Scope Before: `MyModel.addHook('beforeCreate', function() { this.someMethod(); });` After: `MyModel.hooks.add('beforeCreate', () => { MyModel.someMethod(); });`
Simon Schick committed
-
- 12 Jun, 2019 16 commits
-
-
Simon Schick committed
-
Simon Schick committed
-
Erik Seliger committed
-
Erik Seliger committed
-
BREAKING CHANGE: All CLS support has been removed. Migration guide: If you do not use CLS, you can ignore this. Check all your usage of the `.transaction` method and make you sure explicitly pass the `transaction` object for each subsequent query.
Simon Schick committed -
BREAKING CHANGE: `Model.build` has been removed. Use `Model.bulkBuild` or `new Model` instead. Co-authored-by: Simon Schick <demwizzy@gmail.com>
Erik Seliger committed -
BREAKING CHANGE: If you have relied on accessing sequelize operators via `Symbol.for('gt')` etc. you must now prefix them with `sequelize.operator` eg. `Symbol.for('sequelize.operator.gt')`
Simon Schick committed -
BREAKING CHANGE: Operator aliases were soft deprecated via the `opt-in` option `operatorAlises` in v5 they have been entirely removed. Please refer to previous changelogs for the migration guide.
Simon Schick committed -
Simon Schick committed
-
Simon Schick committed
-
BREAKING CHANGE: Only NodeJS v8 and greater are now supported
Simon Schick committed -
Simon Schick committed
-
Simon Schick committed
-
Simon Schick committed
-
Simon Schick committed
-
Simon Schick committed
-
- 11 Jun, 2019 1 commit
-
-
Sushant committed
-
- 10 Jun, 2019 4 commits
-
-
Jonas Zhang committed
-
Vitaliy Zaytsev committed
-
JP Denford committed
-
Musiienko Serhii committed
-
- 29 May, 2019 3 commits
-
-
Théo Frasquet committed
-
Pedro Augusto de Paula Barbosa committed
-
dy93 committed
-
- 23 May, 2019 4 commits
-
-
Wouter De Schuyter committed
-
Abady committed
-
Pedro Machado committed
-
Vitaliy Zaytsev committed
-
- 12 May, 2019 2 commits
-
-
Erik Seliger committed
-
Ægir Örn Símonarson committed
-
- 10 May, 2019 1 commit
-
-
Emmanuel Gautier committed
-
- 09 May, 2019 1 commit
-
-
Sean Hagstrom committed
-
- 07 May, 2019 3 commits
-
-
Thomas Egbert Duursma committed
-
Pedro Augusto de Paula Barbosa committed
-
Pedro Augusto de Paula Barbosa committed
-
- 05 May, 2019 1 commit
-
-
Erik Seliger committed
-
- 04 May, 2019 2 commits
-
-
Tony committed
-
Erik Seliger committed
-