2nd instance if err := tx. Table("table_name"). Where("some_condition"). Clauses( clause.OnConflict{ Columns: []clause.Column{{Name: "id"}}, DoUpdates: clause.Assignments(map[string]interface{}{ "col1": "some_value", "col2": gorm.Expr("(col2+ ?)", 1500), }), }, ). ...
And testing with your playground (after fix your syntax error with the: Error 1052 (23000): Column 'id' in where clause is ambiguous), the two pieces of code have same results too (with both version v1.25.9 and your playground version v1.25.4) // [rows:0] SELECT `abs`.`id`,`abs...
{"1","2","3"}//used in where in clausedb:=getDB()//step 1. do some query work, not with Debug()db.Table("test").Select("val").Where("id in ?",IDList).Find(&tmp)//step2. do another query work, it will inherit the "Select", "Where" methods before, and cannot workdb...