SeyZ / jsonapi-serializer

A Node.js framework agnostic library for (de)serializing your data to JSON API
MIT License
735 stars 196 forks source link

More Specific Ancestry Check #248

Open swards opened 3 years ago

swards commented 3 years ago

In the situation where a child has a type that is a substring of the parent type, jasonapi-serializer will stop looking for relationships at the child.

In our case, the parent was agent_lead and the child was agent. No relationships were being applied to the agent instance.

After this change, all relationships for the child were completed.

The test for ancestry is now more specific by testing for type and id.