update or create Columns 指定联合唯一约束 or 不指定结果没有任何区别

The document you expected this should be explained

Expected answer

Comment From: zhongsdjn

err = db.Debug().Clauses( clause.OnConflict{ Columns: []clause.Column{{Name: "author"}, {Name: "title"}}, // 加不加 or Name: "id" 测试都一样 DoUpdates: clause.AssignmentColumns([]string{"sale_num", "updated_at"}), }).Create(&a).Error

Comment From: jinzhu

Columns doesn't work with mysql driver, it will use all unique indexes by default.