mirror of https://github.com/go-gorm/gorm.git
Return cloned db instance for AddForeignKey
This commit is contained in:
parent
bdb6fc55e8
commit
2a1d64c3e0
2
main.go
2
main.go
|
@ -434,7 +434,7 @@ Example:
|
|||
func (s *DB) AddForeignKey(field string, dest string, onDelete string, onUpdate string) *DB {
|
||||
scope := s.clone().NewScope(s.Value)
|
||||
scope.addForeignKey(field, dest, onDelete, onUpdate)
|
||||
return s
|
||||
return scope.db
|
||||
}
|
||||
|
||||
func (s *DB) Association(column string) *Association {
|
||||
|
|
Loading…
Reference in New Issue