tylerlong/quick_orm

How to specify table name?

kunzhipeng opened this issue · 2 comments

Can you tell me how to specify a table name? I tried following, but it didn't work.

class Location:
    __tablename__ = 'Locations'
    name = Column(String(100))

Hi, currently quick_orm does not support customizing table names. The table name is camelcase_to_underscore(class_name) by default. For example: Location => location; TheLocation => the_location

I am going to add table names customizing support. Just wait for a couple of days.

And you can contribute to quick_orm too. The core code of quick_orm only counts 217 lines, it is not hard at all.

Thanks.