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

[BUGFIX beta] Fix JSONSerializer.serializeHasMany() issue #3760 #3765

Merged
merged 1 commit into from
Sep 17, 2015

Conversation

sebweaver
Copy link
Contributor

serializeHasMany() omits unknown relationships of pushed record rather than
setting them to undefined.

sebweaver added a commit to sebweaver/ember-localforage-adapter that referenced this pull request Sep 14, 2015
Temp workaround for ED issue emberjs/data#3760 until
the PR emberjs/data#3765 will be merged.

Also change class structure to fit the current one (with a dedicated
`_shouldSerializeHasMany` method).
sebweaver added a commit to sebweaver/ember-localforage-adapter that referenced this pull request Sep 14, 2015
Temp workaround for ED issue emberjs/data#3760 until
PR emberjs/data#3765 is merged.

Change class structure also to reflect the new one introduced earlier by ED 1.13
(with dedicated `_shouldSerializeHasMany`).

env.store.serializerFor("post").serializeHasMany(post._createSnapshot(), json, { key: "comments", options: {} });

console.log(json);
Copy link
Member

Choose a reason for hiding this comment

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

Could you remove this console.log?

`serializeHasMany()` omits unknown relationships of pushed record rather than
setting them to `undefined`.
@sebweaver
Copy link
Contributor Author

My bad, I removed the extraneous console.log.

bmac added a commit that referenced this pull request Sep 17, 2015
[BUGFIX beta] Fix JSONSerializer.serializeHasMany() issue #3760
@bmac bmac merged commit 047c1ea into emberjs:master Sep 17, 2015
@bmac
Copy link
Member

bmac commented Sep 17, 2015

Thanks @sebweaver

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