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

fix(deserializer): Unable to create polymorphic relationship #298 #299

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

grahambates
Copy link

Adds polymorphic support for belongsTo relationships.

@digitalsadhu
Copy link
Owner

Thanks for the PR @grahambates !
Looks like theres a small lint error to get the tests passing

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.9%) to 93.643% when pulling 94c439d on grahambates:master into 40f9282 on digitalsadhu:master.

@coveralls
Copy link

coveralls commented Jan 16, 2019

Coverage Status

Coverage increased (+0.08%) to 94.634% when pulling be3ab33 on grahambates:master into a7083aa on digitalsadhu:master.

@grahambates
Copy link
Author

I've fixed the lint errors and added some tests.

The failing check is due to use of the spread operator in a dependency (strong-globalize) which breaks compatibility with node 4. This is obviously unreleated to the change.

@grahambates grahambates force-pushed the master branch 2 times, most recently from 2971a66 to 4e1090b Compare January 16, 2019 23:12
@grahambates
Copy link
Author

In getting my tests to work I've also fixed an issue where the serializer did not handle optional polymorphic belongsTo relationships. It would trigger an error where the discriminator value was empty because the relationship was not set. I've added a test case for this too.

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.

3 participants