Open btomasini opened 1 year ago
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?
https://gorm.io/docs/advanced_query.html
How to omit a column on a joined struct.
db.Omit("config").Joins("Realm",db.Omit("config"))
Your Question
How do I omit a column from a joined struct? I have the following:
When I do the following clause:
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.