Skip to content

Ensure previousAttributes are parsed after eagerPair #1457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jbrumwell
Copy link
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
Copy link
Member

@ricardograca ricardograca left a comment

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