Open tsdevelopment opened 2 years ago
This issue has been automatically marked as stale because it has been open 360 days with no activity. Remove stale label or comment or this will be closed in 180 days
Any solution?
does Preload of polymorphic work at all?
Any idea for this?
Unsolvable, feel free to try other orm or manual splicing
Your Question
I have a Polymorphism Association described as follow:
Now I want to fetch all
Messages
and want to have the user in the json response in it. Is this possible ingorm
? So far I tried the following:The relation "UserTypeB" can not be found. How can I get the following output? Is there another way to get the wanted result?
The document you expected this should be explained
https://gorm.io/docs/has_many.html#Polymorphism-Association
Expected answer
The documentation only describes how to create new entries. But the part of getting entries with polymorphism associations is still missing. I also searched on google & co. But I only found a solution when I would fetch
UserTypeA
orUserTypeB
, but notMessages
.