Sorry if this is not the right place for this kind of problem or if someone else already faced with the same problem.
Fell free to redirect me or whatever.
So I just faced a problem when I do not use id as a primary key. I would need something like this (see relationships dispatchers data part):
Sorry for late reply. In fact I differentiate json api schema vs database schema. Currently to achieve the wanted behaviour I have to map one schema to other one. In case that json api schema has possibility to use other name for id key, then I do not need mapping.
The background problem is that I have two systems that have to be synched, first system is older then 5 years, and the other one is new one. Both system uses postgres as a database, and because of above we have different ids for same resource. So we are not able to match object based on id, and we have introduced tspa_id to be same on both systems. And now we are facing with matching problems (in included part of the json api schema). As a quick solution we added attribute instead relationships that has list of dispatcher ids.
Just as note: I do not claim that my proposed solution is correct, good or whatever. Let’s say I have edge case, and I just wanted to bring it to light, so that people that made json api schema, have additional information about other use cases and possible solutions.