diff --git a/callbacks/associations.go b/callbacks/associations.go index e6669600..9e767e5e 100644 --- a/callbacks/associations.go +++ b/callbacks/associations.go @@ -318,12 +318,8 @@ func onConflictOption(stmt *gorm.Statement, s *schema.Schema, selectColumns map[ if len(defaultUpdatingColumns) > 0 { var columns []clause.Column - if s.PrioritizedPrimaryField != nil { - columns = []clause.Column{{Name: s.PrioritizedPrimaryField.DBName}} - } else { - for _, dbName := range s.PrimaryFieldDBNames { - columns = append(columns, clause.Column{Name: dbName}) - } + for _, dbName := range s.PrimaryFieldDBNames { + columns = append(columns, clause.Column{Name: dbName}) } return clause.OnConflict{