Skip to content

Commit 4a88ec1

Browse files
calebxcxiang03
andauthored
Fix create transaction locking issue (#13)
* define default attributes model * Revert "define default attributes model" This reverts commit e99c9d8. * fix transcation lock issue Co-authored-by: Caleb Xiang <[email protected]>
1 parent 1033f63 commit 4a88ec1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

nested_set.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ func Create(db *gorm.DB, source, parent interface{}) error {
167167
}
168168
}
169169

170-
// skip the table & scope, since they should be all setup by caller
171-
return db.Create(source).Error
170+
return tx.Create(source).Error
172171
})
173172
}
174173

0 commit comments

Comments
 (0)