使用v1.25.9版本,更新db字段失败

type Animals struct {
    Name    string `gorm:"column:name"`
    Age        int    `gorm:"column:age"`
    Context string `gorm:"column:context"`
}

func mockUpdate(db *gorm.DB) {
    animal := &Animals{
        Name:    "",
        Context: "zxasc",
    }

    db.Debug().Model(&Animals{}).Where("id = ?", 1).Updates(animal)
}

期望将name字段设置空,将context字段设置为zxasc,执行完后只修改了context字段,name字段并没有修改,请问updates是不支持这样更新db吗?

Comment From: github-actions[bot]

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking

Comment From: JIeJaitt

gorm好像不是这样用的,你试试把Name设置为sql.NullString

Comment From: github-actions[bot]

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking