[Python] sqlalchemy orm column name convention

Discussão em 'Python' iniciado por Stack, Agosto 20, 2025.

  1. Stack

    Stack Membro Participativo

    How do I automatically map all of my fields of the forms my_column to corresponding columns MyColumn in the database?

    class MyTable(Base):
    __tablename__ = 'MyTable'
    # what I have now:
    my_column_1 = Column('MyColumn1', Integer)
    # what I want: how to configure a convention mapping rule for this:
    my_column_1 = Column(Integer)

    Continue reading...

Compartilhe esta Página