Closed clorbus closed 4 years ago
Update
It's skipping the OrganizationSerializer entirely. Looking at the code that serializes relationships, it looks like it skips the serializer and uses a method called id_hash_from_record
instead.
id_hash_from_record
looks for an id_method_name
attribute, which you can specify as the method you'd like it to use for id lookup.
Closing this issue as it's not a bug.
I use randomly generated
uid
s rather than incrementalid
s to identify resources in our API. Fast JSON API has a mechanism (set_id
) to specify the value you'd like to use as theid
.However, this setting is ignored for relationships. In the example below, the Organization's
id
is "5" but theuid
is "97132034882" which is what should have been returned.Note that the meeting's
id
is "8" and it correctly returns theuid
of "74992482388" as specified in the serializer.Maybe it's just ignoring the OrganizationSerializer?
meeting_serializer.rb
organization_serializer.rb
step to reproduce