You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to implement JSON:API endpoints where I have belongs_to relationship so the ID is directly in the loaded table, but this library (probably because of #103) won't show these relationships unless they are explicitely loaded.
I think preloading the belongs_to relationship makes no sense as we only display the ID and type. For has_many relationship, the current behaviour is of course desirable.
Here is a workaround by setting the relationship by hand:
I totally agree with you. I've been trying to come up with a resolution to this in #174 , but I'm a bit drained for time at the moment. The biggest challenge as I see it is changing how relationships work whilst providing a clean upgrade path.
This issue has been automatically marked as "stale:discard". We are sorry that we haven't been able to prioritize it yet.
If this issue still relevant, please leave any comment if you have any new additional information that helps to solve this issue. We encourage you to create a pull request, if you can. We are happy to help you with that.
Hello all,
I am trying to implement JSON:API endpoints where I have
belongs_to
relationship so the ID is directly in the loaded table, but this library (probably because of #103) won't show these relationships unless they are explicitely loaded.I think preloading the
belongs_to
relationship makes no sense as we only display the ID and type. Forhas_many
relationship, the current behaviour is of course desirable.Here is a workaround by setting the relationship by hand:
After this the folder relationship will be included and no other SQL queries (or joins) need to happen...
What do you think? Am I missing something?
The text was updated successfully, but these errors were encountered: