mirror of https://github.com/go-gorm/gorm.git
Fix table name for association
This commit is contained in:
parent
308c96ee4c
commit
5ddca7c427
2
scope.go
2
scope.go
|
@ -259,7 +259,7 @@ func (scope *Scope) TableName() string {
|
||||||
return tabler.TableName(scope.db)
|
return tabler.TableName(scope.db)
|
||||||
}
|
}
|
||||||
|
|
||||||
return scope.GetModelStruct().TableName(scope.db)
|
return scope.GetModelStruct().TableName(scope.db.Model(scope.Value))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (scope *Scope) QuotedTableName() (name string) {
|
func (scope *Scope) QuotedTableName() (name string) {
|
||||||
|
|
Loading…
Reference in New Issue