Skip to content

restore setDataValue, fixed set issue with customGetter/Setter - #7328

Merged
sushantdhiman merged 1 commit into
masterfrom
fix-wrong-previous-implementation
Mar 6, 2017
Merged

sushantdhiman merged 1 commit into
masterfrom
fix-wrong-previous-implementation

Conversation

@sushantdhiman

Copy link
Copy Markdown
Contributor

Fixed incorrect changes in previous method working from #7189 (comment)

Actual issue that PR was trying to solve was incorrect previous value when using custom getter / setter. So I have added few more unit tests and a fix for that issue @nemisj

This will also conform with the fact that _previousDataValues should be set in last stage of hook lifecycle.

@BorisKozo @barriber initially pointed out this issue, you guys please have a look on new changes as well

@codecov-io

codecov-io commented Mar 4, 2017 •

Copy link
Copy Markdown

Codecov Report

Merging #7328 into master will increase coverage by <.01%.
The diff coverage is 100%.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8fd3fb6...791b4c0. Read the comment docs.


beforeEach(function() {
Account = this.sequelize.define('Account', {
this.Account = this.sequelize.define('Account', {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the benefit of using the shared test context over a scoped variable? You don't get any help from your editor for the text context

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scope is already shared among tests, its just a good practice to keep shared data passed this way. Most modern editors support hinting variables defined this way as well, but i wasn't concerned about that.

@nemisj

nemisj commented Mar 6, 2017 •

Copy link
Copy Markdown

that's nice, thanks @sushantdhiman 👍
will you port it to v3 too?

@sushantdhiman
sushantdhiman merged commit 6d37b08 into master Mar 6, 2017
@sushantdhiman
sushantdhiman deleted the fix-wrong-previous-implementation branch March 6, 2017 12:01
@sushantdhiman

Copy link
Copy Markdown
Contributor Author

@nemisj Please port it to v3 :)

@nemisj

nemisj commented Mar 6, 2017

Copy link
Copy Markdown

@sushantdhiman sure :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants