-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resource option always_include_linkage_data: true
not working
#1394
Comments
always_include_linkage_data: true
not working always_include_linkage_data: true
not working
I'm using this same version at work. Like you, I also needed the "data" key with the type and id of the related resource inside the "relationships" key, for each resource I tried to retrieve on a list. I've tried using "always_include_linkage_data: true" on the relation definition of the resource class I was fetching. I didn't work too, but I managed to get what I whanted by adding the include query parameter as defined by the JSON:API spec, asking for the related resource as well. |
Hi @lucaslm |
I ran into this as well. I think the documentation is outdated, as it references
|
Yes |
It seems this option does not work when the relationship is toMany (but requiring the resource through the include query parameter does, as I explained). |
This issue is a (choose one):
Checklist before submitting:
Description
Choose one section below and delete the other:
Bug reports:
Under Rails 6 (6.1.7), at the latest gem version (
0.10.7
) , usingalways_include_linkage_data: true
option does not returntype
andid
of a given relationship. Downgrading to0.9.12
solves the issue without any code modification.The text was updated successfully, but these errors were encountered: