Let's say I have:
type A struct {
ID string `gorm:"primary_key"`
Name string
}
type B struct {
ID string `gorm:"primary_key"`
AId string
A A `gorm:"foreignkey:AId"`
Val string
}
If I wanted to do a normal query on A or B, I can just expect the A or B struct back. But if I wanted to do a join, what struct should I expect in go?
For example if my query were:
select * from a join b on a.id = b.a_id;
What does GORM return as a struct?