-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
inverse relationships not set up when pushing jsonapi blob with polymorphic model #5267
Comments
Test added in PR #5268 |
@stefanpenner I'm not sure of the best way to fix this. The We could add multiple cache entries for each of the different descendants, but I'm not sure how to discover them. |
I think I found a way... see PR for details |
I believe this has been resolved by #5230. Feel free to reopen if it is still an issue. |
Single source of truth isn't working for polymorphic relationships.
Push a
hasMany
with a descendant model. You'd expect that the matchingbelongsTo
on the descendant model points back to the parent model. Instead it's null.This works if the child model is the type specified in the
hasMany
, but not if it's a descendant model.Workaround: add
post
relationship intocomment1
in jsonapiWorking on a PR with test
The text was updated successfully, but these errors were encountered: