Describe the feature
Allow me to updates non zero value
Motivation
map[string]interface{} is complicated to use when you have complex structures like :
type Component struct {
gorm.Model
FamilyID uint
Name string
...
// Relationships
1 []1 `gorm:"ForeignKey:ComponentID;constraint:OnUpdate:CASCADE"`
2 []2 `gorm:"ForeignKey:ComponentID;constraint:OnUpdate:CASCADE"`
3 []3 `gorm:"ForeignKey:ComponentID;constraint:OnUpdate:CASCADE"`
4 []4 `gorm:"ForeignKey:ComponentID;constraint:OnUpdate:CASCADE"`
5 []5 `gorm:"ForeignKey:ComponentID;constraint:OnUpdate:CASCADE"`
...
// Relationships others
10 []10 `gorm:"ForeignKey:ComponentID;constraint:OnUpdate:CASCADE"`
11 []11 `gorm:"ForeignKey:ComponentID;constraint:OnUpdate:CASCADE"`
}
Related Issues
3901
Description
maybe add : - gorm:"allowzero"
maybe fix : - Select(*) before Update or Updates
Comment From: github-actions[bot]
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