diff --git a/scope.go b/scope.go index de1b6159..8ff514a9 100644 --- a/scope.go +++ b/scope.go @@ -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) {