Skip to content

Commit

Permalink
refact(database): add omit Associations for UpsertModelsOnUniqueID
Browse files Browse the repository at this point in the history
  • Loading branch information
Matrix-X committed Nov 15, 2022
1 parent 595fd8f commit 2cca2a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions database/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ func UpsertModelsOnUniqueID(db *gorm.DB, mdl interface{}, uniqueName string,
}

result := db.Model(mdl).
Debug().
//Omit(clause.Associations).
//Debug().
Omit(clause.Associations).
Clauses(clause.OnConflict{
Columns: []clause.Column{{Name: uniqueName}},
DoUpdates: clause.AssignmentColumns(fieldsToUpdate),
Expand Down

0 comments on commit 2cca2a9

Please sign in to comment.