-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Polymorphism Many To Many support #4004
Comments
Any update on this? @jinzhu |
@yaameen I had the same problem mentioned here: #4270 and i solved it with 2 different join tables, i don't know if it solves your problem too, can you share any example?
|
Actually that's what I miss most with GORM: Real OO-like ploymorphism support As far as I understand GORM the polymorphic type can only be at the 1-end of the relation, right? |
if you make an explicit model for your many-to-many relation for A-B (B being the desired polymorphic model), let's call it C, you then have A-C one-to-many and C-B many-to-one and you can use polymorphism. I think it's reasonable to add "polymorphism" to the list of customizations of a join table that warrant making the join table explicit, so this seems like it should be converted to a documentation request rather than a feature request. |
Describe the feature
Polymorphism Many To Many support
Motivation
Related Issues
The text was updated successfully, but these errors were encountered: