Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Support for polymorphic relationships #367

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Support for polymorphic relationships #367

wants to merge 4 commits into from

Conversation

buckmaxwell
Copy link

It is desirable to be able to include a collection of resources that may inherit from one type, but have different types. This is both supported by the JSON API spec, and by many front end frameworks that implement it like ember which provides this excellent use case.

The change here is to allow for users to define a type_ attribute on the serialized instance that takes preference over a type defined with the type_ key. This results in no behavior changes for existing functionality, and should be considered backward compatible.

Thank you everyone for you work on this; I am making use of this library and am a big fan.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant