Your Question
e = stat.DB().Model(stat).Clauses(clause.OnConflict{
//Columns: nil,
//Where: clause.Where{},
//TargetWhere: clause.Where{},
//OnConstraint: "",
//DoNothing: false,
//DoUpdates: nil,
UpdateAll: true,
}).Create(&stat).Error
INSERT INTO `stat` (`date`,`reg`,`active`,`connect`,`online_device_num`,`download`,`download_android`,`download_linux`,`install`,`uninstall`) VALUES ('2024-04-08 16:33:05.293',1,1,1,1,1,2,3,4,5) ON DUPLICATE KEY UPDATE `id`=`id`
ON DUPLICATE KEY UPDATE 后面的字段未展开并填充
The document you expected this should be explained
Expected answer
Comment From: wlbwlbwlb
gorm v1.25.9 mysql v8.0.36