mirror of https://github.com/go-gorm/gorm.git
Fix build exception
This commit is contained in:
parent
0e1cb6ece9
commit
e9309d361f
2
scope.go
2
scope.go
|
@ -1176,7 +1176,7 @@ func (scope *Scope) addForeignKey(field string, dest string, onDelete string, on
|
|||
}
|
||||
|
||||
func (scope *Scope) removeForeignKey(field string, dest string) {
|
||||
keyName := scope.Dialect().BuildForeignKeyName(scope.TableName(), field, dest)
|
||||
keyName := scope.Dialect().BuildKeyName(scope.TableName(), field, dest)
|
||||
|
||||
if !scope.Dialect().HasForeignKey(scope.TableName(), keyName) {
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue