Thanks for the detailed explanation.
On Thu, Feb 3, 2022 at 10:18 PM Mike Bayer wrote:
>
> the names of attributes on your Python class and the names of columns that
> are emitted in SQL are two separate things.When you have "jobid =
> Column(Integer, ...)" , that's a declarative-only
the names of attributes on your Python class and the names of columns that are
emitted in SQL are two separate things.When you have "jobid =
Column(Integer, ...)" , that's a declarative-only format that omits the first
argument to Column which is the "name"; the declarative mapping process
I normally define a column in a model like this, for example:
jobID = Column(Integer, nullable=False, primary_key=True)
I now have a case where there are columns in the db that have spaces
so I want to map the column name to a variable of a different name.
Googling I found this: