We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ad1b85 commit c2fd891Copy full SHA for c2fd891
callbacks/associations.go
@@ -347,10 +347,11 @@ func SaveAfterAssociations(create bool) func(db *gorm.DB) {
347
}
348
349
if joins.Len() > 0 {
350
- db.AddError(db.Session(&gorm.Session{}).Clauses(clause.OnConflict{DoNothing: true}).Session(&gorm.Session{
+ if err := db.AddError(db.Session(&gorm.Session{}).Clauses(clause.OnConflict{DoNothing: true}).Session(&gorm.Session{
351
SkipHooks: db.Statement.SkipHooks,
352
DisableNestedTransaction: true,
353
- }).Create(joins.Interface()).Error)
+ }).Create(joins.Interface()).Error); err != nil {
354
+ }
355
356
357
0 commit comments