-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use Include filter to get polymorphic belongsTo relation #1319
Comments
@zane-insta Can you provide a link to your github repo that contains the test case? |
@raymondfeng Here is an example repository outlining the issue. I have three tests that can be run with |
Hello, Any update on this issue? I am experiencing the same as @zane-insta as I have a Catalogue model that represents various types of content, having a 'belongsTo' relationship with them, and really need to be able to include the original content with the Catalogue model. Cheers, |
Hi @zane-insta , that's what I get if I run your tests:
I believe line 16 should be
BTW, if we set id=2 in line 88, the test will pass. if there is something that I am missing, please clarify further. thanks. |
Sorry I do not use @zane-insta anymore. So changing line 88 would turn the second and third test into the same test which defeats the purpose. In test 2 you can see that |
@zanemcca |
We are facing similar issues, is the polymorphic relation unusable then ? No update on such a critical issue. |
I have the same issue. Any update on this? |
Facing the same issue, any updates??? |
I'm facing the same issue. With a custom Id, Polymorphic belongsTo relation is not fetching the object when using include filter! 👎 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
for anyone searching this issue, you're best bet is probably a scope defined in I"ve realized that fighting to separate the values in the json file, and the logic in the mainly because of this bug |
Hi,
I have a polymorphic comment model that can belong to several other models. I want to be able to query the comment and include the parent model that it belongs to.
I have my comment model defined below.
I am trying to query it by calling ...
I receive the comment back fine but the commentable type is not retrieved properly.
I dug into the debug logs and I believe there is a bug somewhere because when it queries the database for the related model it says
but it should be asking for
since I have a custom id member named myId instead of the default id.
The text was updated successfully, but these errors were encountered: