diff --git a/internal/generate/query.go b/internal/generate/query.go index c9e27e10..3be8d803 100644 --- a/internal/generate/query.go +++ b/internal/generate/query.go @@ -50,8 +50,8 @@ func (b *QueryStructMeta) parseStruct(st interface{}) error { if err != nil { return err } - b.TableName = stmt.Table - b.FileName = strings.ToLower(stmt.Table) + b.TableName = b.db.NamingStrategy.TableName(stmt.Table) + b.FileName = strings.ToLower(b.TableName) var fp FieldParser = dummyFieldParser{} if fps, ok := st.(FieldParser); ok && fps != nil {