[SQLObject] Creating new objects in pre-existing table
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: luis c. <lo....@gm...> - 2010-08-20 17:43:39
|
I have a pre-defined table in a SQL Server database that contains 4 columns + the primary key (integer). My class in Python is defined as: class HistoricalMatrix(SQLObject): class sqlmeta: fromDatabase = True table="HistoricalMatrix" ccy = StringCol(length = 4) dataDate = DateCol() handle = StringCol(length = 128) coeff = StringCol() the columns in the database are: id ccy data_date handle coeff The data_date column is specified as "data_date" in the database - is there a way I can specify this in the class definition? I came about using the mixed-case setup after some errors declaring the field as data_date in my Python class. |