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

Don't reset sync relationship #5880

Merged
merged 3 commits into from
Mar 9, 2019

Conversation

ryanto
Copy link
Contributor

@ryanto ryanto commented Mar 1, 2019

This PR changes the known to be empty behavior. It allows a second payload push without included data to keep any relationship data that the model knows about.

Related issue: #5866

This PR makes changes the known to be empty behavior. It allows a second get request without an include string will keep any relationship data that the model knows about.
testInDebug(
'Calling push with a link for a non async relationship should not reset an existing relationship',
function(assert) {
Person.reopen({
Copy link
Contributor

Choose a reason for hiding this comment

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

could you write a test that

  • does not use reopen
  • does not use run

To do this you may need to make the test async. In some cases you may also want to await settled() to ensure relationship state is fully settled post-push, although in this case it should not matter.

* Don't reopen class, use original relationship
* Don't use Ember.run
@runspired runspired merged commit d43d3a5 into emberjs:master Mar 9, 2019
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.

2 participants