Your Question
How do I omit a column from a joined struct? I have the following:
type Client struct {
Realm *Realm
Config string
}
type Realm struct {
Config string
}
When I do the following clause:
db.Join("Realm").Omit("config", "Realm.config")
The config is omitted on the root client, but not the realm. How do I instruct Gorm to omit a column on a joined struct?
The document you expected this should be explained
https://gorm.io/docs/advanced_query.html
Expected answer
How to omit a column on a joined struct.
Comment From: 0fv
db.Omit("config").Joins("Realm",db.Omit("config"))