You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Love the addition of the SQLModelGenerator. However the generated models transform the table names in undesired ways (e.g. some_random_table becomes somerandomtable).
Removing render_class_variables from the SQLModelGenerator class, or simply calling super().render_class_variables there fixes the issue. DeclarativeGenerator.render_class_variables adds the __tablename__ class variable, which is supported by SQLModel, see here.
I'm happy to open a PR, but I'm not sure if this would have unintended consequences (or if there's a better way to accomplish this).
The text was updated successfully, but these errors were encountered:
brianmcburney
pushed a commit
to brianmcburney/sqlacodegen
that referenced
this issue
May 8, 2022
Love the addition of the SQLModelGenerator. However the generated models transform the table names in undesired ways (e.g.
some_random_table
becomessomerandomtable
).Removing
render_class_variables
from the SQLModelGenerator class, or simply callingsuper().render_class_variables
there fixes the issue.DeclarativeGenerator.render_class_variables
adds the__tablename__
class variable, which is supported by SQLModel, see here.I'm happy to open a PR, but I'm not sure if this would have unintended consequences (or if there's a better way to accomplish this).
The text was updated successfully, but these errors were encountered: