-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Fix error with polymorphic relations when the attribute name is different to related #9396
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9396 +/- ##
==========================================
+ Coverage 35.07% 35.12% +0.04%
==========================================
Files 1308 1310 +2
Lines 14465 14535 +70
Branches 1439 1453 +14
==========================================
+ Hits 5074 5105 +31
- Misses 8481 8514 +33
- Partials 910 916 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
37cd78f
to
c0e147e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this fix 💯
A few notes
- We need to make sure the behaviour is the same on mongo before merging
- To avoid unintended issues can you add a e2e test with a polymorphic model using this fix ?
Thanks for reviewing the PR
*@alexandrebodin*
- We need to make sure the behaviour is the same on mongo before merging
=> The e2e test would validate that, right?
…On Mon, Feb 15, 2021 at 3:09 AM Alexandre BODIN ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Thank you for this fix 💯
A few notes
- We need to make sure the behaviour is the same on mongo before
merging
- To avoid unintended issues can you add a e2e test with a polymorphic
model using this fix ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9396 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABQBRDGZQTV3CS4LT2B5O3S7DJEFANCNFSM4XS445DA>
.
--
Cordialmente,
German Andrés González Avellaneda
Tel Movil: 3012315971
|
Hi @germangonzo did you have time to work on the changes ? |
Unfortunately, no. I've been pretty busy these weeks |
What does it do?
Use the polymorphic attribute info to name the type field correctly.
Currently, It is hardcoded to
related_type
Why is it needed?
Fix error with polymorphic relations when the attribute name is different to
related
Related issue(s)/PR(s)
Look at the last comment of the issue
#5348