GORM Playground Link
go-gorm/playground#1
Description
On the GORM documentation page (https://gorm.io/docs/update.html#Updates-multiple-columns
), it says the Generics API can update multiple columns using:
rows, err := gorm.G[User](db).Where("id = ?", 111).Updates(ctx, map[string]interface{}{"name": "hello", "age": 18, "active": false})
However, this results in an error:
cannot use map[string]interface{}{} (value of type map[string]interface{}) as User value in argument to gorm.G[User](db).Where("id = ?", 111).Updates [IncompatibleAssign]