Fix table name for association

This commit is contained in:
Jinzhu 2015-06-30 10:39:29 +08:00
parent 308c96ee4c
commit 5ddca7c427
1 changed files with 1 additions and 1 deletions

View File

@ -259,7 +259,7 @@ func (scope *Scope) TableName() string {
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) {