不要怂,就是干,撸起袖子干!

Commit 966ef305 by Sushant

docs: changelog

1 parent 409a938d
Showing with 35 additions and 0 deletions
......@@ -11,6 +11,8 @@ Sequelize follows [SEMVER](http://semver.org).
New to Sequelize? Take a look at the [Tutorials and Guides](https://sequelize.org/master). You might also be interested in the [API Reference](https://sequelize.org/master/identifiers).
**Note :** We have started `v6-beta` release. You can find changelog [here](https://github.com/sequelize/sequelize/blob/master/docs/manual/upgrade-to-v6.md).
## Table of Contents
- [Installation](#installation)
- [Documentation](#documentation)
......@@ -21,6 +23,7 @@ New to Sequelize? Take a look at the [Tutorials and Guides](https://sequelize.or
```bash
$ npm install --save sequelize # This will install v5
$ npm install --save sequelize@next # This will install v6-beta
# And one of the following:
$ npm install --save pg pg-hstore # Postgres
......
......@@ -8,4 +8,36 @@ Sequelize v6 is the next major release after v5
Sequelize v6 will only support Node 10 and up [#10821](https://github.com/sequelize/sequelize/issues/10821)
### Model
**`options.returning`**
Option `returning: true` will no longer return attributes that are not defined in the model. Old behavior can be restored by using `returning: ['*']`
**`Model.changed()`**
This method now tests for equality with `_.isEqual` and is now deep aware. Modifying nested value for JSON object won't mark them as changed, because it is still the same object.
```js
const instance = await MyModel.findOne();
instance.myJsonField.a = 1;
console.log(instance.changed()) => false
await instance.save(); // this will not save anything
instance.changed('myJsonField', true);
console.log(instance.changed()) => ['myJsonField']
await instance.save(); // will save
```
## Changelog
### 6.0.0-beta.2
- feat(postgres): change returning option to only return model attributes [#11526](https://github.com/sequelize/sequelize/pull/11526)
- fix(associations): allow binary key for belongs-to-many [#11578](https://github.com/sequelize/sequelize/pull/11578)
- fix(postgres): always replace returning statement for upsertQuery
- fix(model): make .changed() deep aware [#10851](https://github.com/sequelize/sequelize/pull/10851)
- change: use node 10 [#11580](https://github.com/sequelize/sequelize/pull/11580)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!