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

Serializer handles null/unspecified relationships #30

Merged

Conversation

glsignal
Copy link
Contributor

@glsignal glsignal commented May 26, 2016

Priority

Merging sooner rather than later would be ideal (pending discussion/approval, obviously), as this is relied on in production.

What Changed & Why

Alters the behaviour around serializing unspecified/null/empty relationships as per the description in #29 - the tests included in this PR describe the changes in detail, but the summary is:

  • unspecified relationships are not serialized
  • hasOne relationships that are deliberately set to null are serialized correctly
  • hasMany relationships that are deliberately set to empty arrays are serialized correctly
  • relationship object is omitted if no relationships are specified at all

@Emerson
Copy link
Collaborator

Emerson commented May 26, 2016

This is great! Really appreciate the work 👍

Just checking with a couple folks on our end....

@Emerson Emerson merged commit 11db5c3 into devour-js:master May 26, 2016
@glsignal glsignal deleted the gs_empty_null_relationship_serialization branch May 27, 2016 02:58
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