diff --git a/database/model.go b/database/model.go index 5a8d3f6..9af3131 100644 --- a/database/model.go +++ b/database/model.go @@ -272,10 +272,12 @@ func UpsertModelsOnUniqueID(db *gorm.DB, mdl interface{}, uniqueName string, result := db.Model(mdl). //Debug(). + Omit(clause.Associations). Clauses(clause.OnConflict{ Columns: []clause.Column{{Name: uniqueName}}, DoUpdates: clause.AssignmentColumns(fieldsToUpdate), - }).Create(models) + }). + Create(models) return result.Error }