-
Notifications
You must be signed in to change notification settings - Fork 43
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
Relationship route error when relationship is marked as hidden #105
Comments
Looking at this, even if we fix it at the point this error is occurring, there's a chance it might also then fail further down the encoding stack. Primarily here: And then again here: Though the code-path for that might be for relationship identifiers, rather than related resource. However the problem is the same - as the relationship field is hidden, we cannot acquire the information from the resource. The problem with the encoder package is the return type isn't nullable - you have to return a link. This presents a significant challenge for this scenario. Workaround: The work-around is to not hide the relationship and have it as a links-only relationship. I.e. the relationship is not hidden, but uses the This actually explains why I've never encountered this problem... because I always use links-only relationships rather than hiding relationships. |
Potential Solution Potentially the This would be preferrable to exposing the schema, which is not desirable because the use of the schema by the resource is an internal implementation detail. I.e. calling code shouldn't expect the resource to have the schema. |
Actually, #111 would be a good solution for this - though we'd have to make the |
Closing as will be in the |
Steps to reproduce:
in my case:
{{url}}/api/declarations/{{declaration_id}}/patient
Stack trace:
The text was updated successfully, but these errors were encountered: