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

{backport beta} Beta fix relationship merging #5148

Merged
merged 1 commit into from
Aug 25, 2017

Conversation

stefanpenner
Copy link
Member

When relationship information is merged, the newest information should win.
Unfortunately prior to this PR, relationship containing only link information, would mistakenly purge any existing data information on that relationship.

  1. Update One
{
    data: { /* existing data */ },
    Link: { /* existing data */ },
}
  1. Update Two
{
    Link: { /* new data */ },
}

Previously resulted in:

{
   link: { /* new data */ },
   data: null // oops
}

But now (correctly) results in:

{
   link: { /* new data */ },
   data: { /* existing data */ }
}

When relationship information is merged, the newest information should win.
Unfortunately prior to this PR, relationship containing only `link` information, would mistakenly purge any existing `data` information on that relationship.


1. Update One
```js
{
    data: { /* existing data */ },
    Link: { /* existing data */ },
}
```

2. Update Two

```js
{
    Link: { /* new data */ },
}
```

Previously resulted in:

```js
{
   link: { /* new data */ },
   data: null // oops
}
```

But now (correctly) results in:

```js
{
   link: { /* new data */ },
   data: { /* existing data */ }
}
```
@stefanpenner stefanpenner merged commit c58c065 into beta Aug 25, 2017
@stefanpenner stefanpenner deleted the beta-fix-relationship-merging branch August 25, 2017 12:48
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.

None yet

2 participants