Skip to content
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

Belongs-To set to null or undefined #333

Merged
merged 6 commits into from
Jan 7, 2019
Merged

Conversation

snewcomer
Copy link
Collaborator

@snewcomer snewcomer commented Dec 16, 2018

Fix relationship changeset save

Ref #315
Close #199

@snewcomer snewcomer self-assigned this Dec 16, 2018
assert.equal(changeset.get('profile'), null);
assert.equal(user.get('profile').firstName, null);
// failing test
// assert.equal(user.get('profile'), null);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@nickshot Is this the normal behaviour up until you save()?


assert.equal(changeset.get('profile'), null, 'changeset profile relationship is still null');
assert.equal(user.get('profile').get('firstName'), null, 'underlying user profile firstName is null');
assert.ok(user.get('profile'), 'user has yet to call save so still present as proxy');
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@nickshot Lmk if this is what you expect based on the tests. I believe we could close #315 but wanted to check.

@snewcomer snewcomer merged commit 1514174 into 2.0-beta Jan 7, 2019
@snewcomer snewcomer deleted the sn/belongs-to-null branch January 7, 2019 16:00
snewcomer added a commit that referenced this pull request Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants