- defind web api dto struct
type Dto struct {
Start null.Time
}
- send this json to web api
- service: use gorm update entry
gorm.Model(&MyTable).Where("id = 1").Update(&dto)
- Hope to generate sql
update my_table set start = null where id = 1
The start field is now ignored when used in this way