[sqlalchemy] Re: ColumnProperty object has no attribute key

2008-05-31 Thread Michael Bayer
On May 31, 2008, at 4:09 AM, sniffer wrote: hi all, first of all thank u guys for all ur help on my previous posts. This time around i again have a table in an mssql db, the table has just 2 fields one int field(PK) and the other a varchar field. the table object for the table in

[sqlalchemy] Re: ColumnProperty object has no attribute key

2008-05-31 Thread sniffer
Hi michael, thanks for the reply i am trying it in an extremly small script the code is mentioned below def logsync(self): entity=testq self.__sqlorm__dblogger.info(Current Entity - + entity) importcmd=from dbmod.%s import %s as entitymodule % (entity,entity+class)

[sqlalchemy] Re: ColumnProperty object has no attribute key

2008-05-31 Thread Michael Bayer
OK, the usage pattern there is incorrect. Create a Table/Mapper at the module level at the same level in which you create your classes. To make this easier, look into using the declarative extension: http://www.sqlalchemy.org/docs/04/plugins.html#plugins_declarative ...that way there's