Skip to content

Ensure previousAttributes are parsed after eagerPair#1457

Merged
ricardograca merged 1 commit into
bookshelf:masterfrom
jbrumwell:bug/previousAttributes-unparsed
Jan 7, 2018
Merged

Ensure previousAttributes are parsed after eagerPair#1457
ricardograca merged 1 commit into
bookshelf:masterfrom
jbrumwell:bug/previousAttributes-unparsed

Conversation

@jbrumwell

Copy link
Copy Markdown
Contributor

Ensure that previous attributes are properly parsed after eagerPair completes. Currently any models loaded via withRelated do not have their previous models parsed.

An unverified side effect is with _previousAttributes unparsed any call to set will cause a mismatch in parsed attributes and unparsed previous attributes resulting in values that could be equal being recorded as changed.

Should resolve #1394

@ricardograca ricardograca self-requested a review January 7, 2018 20:25

@ricardograca ricardograca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me.

@ricardograca ricardograca merged commit 2f02f0b into bookshelf:master Jan 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

previousAttributes for related models aren't going through the parse function

2 participants