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 c2fd891 commit 9f7ae7aCopy full SHA for 9f7ae7a
callbacks/associations.go
@@ -347,11 +347,10 @@ func SaveAfterAssociations(create bool) func(db *gorm.DB) {
347
}
348
349
if joins.Len() > 0 {
350
- if err := db.AddError(db.Session(&gorm.Session{}).Clauses(clause.OnConflict{DoNothing: true}).Session(&gorm.Session{
+ db.Error = 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); err != nil {
354
- }
+ }).Create(joins.Interface()).Error)
355
356
357
0 commit comments