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.
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 wasagent
. No relationships were being applied to theagent
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.