@@ -115,59 +115,72 @@ Sequelize V4 is a major release and it introduces new features and breaking chan
...
@@ -115,59 +115,72 @@ Sequelize V4 is a major release and it introduces new features and breaking chan
- Raw options for where, order and group like `where: { $raw: '..', order: [{ raw: '..' }], group: [{ raw: '..' }] }` have been removed to prevent SQL injection attacks.
- Raw options for where, order and group like `where: { $raw: '..', order: [{ raw: '..' }], group: [{ raw: '..' }] }` have been removed to prevent SQL injection attacks.
-`Sequelize.Utils` is not longer part of the public API, use it at your own risk
-`Sequelize.Utils` is not longer part of the public API, use it at your own risk
-`Hooks` should return Promises now. Callbacks are deprecated.
-`Hooks` should return Promises now. Callbacks are deprecated.
-`include` is always an array
-`required` inside include does not propagate up the include chain.
To get v3 compatible results you'll need to either set `required` on the containing include.
Previous:
Previous:
```js
```js
User.findAll({
user.findOne({
include: {
include: {
model: Comment,
model: project,
as: 'comments'
include: {
model: task,
required: true
}
}
}
})
});
```
New:
```js
User.findAll({
include: [{
model: Comment,
as: 'comments'
}]
})
```
```
-`where` clause inside `include` does not make this `include` and all its parents `required`. You can use following `beforeFind` global hook to keep previous behaviour: