From: Dave P. <dpo...@te...> - 2003-08-26 12:52:21
|
I have a table named "string" where I have a bunch of strings in various languages that I use to fillout templates. In a second table named "automatic_payment_type" I have 2 columns named 'name' and 'bill_msg' which should both be foreign keys to the 'string' table. Here's my code for this: class String(SQLObject): _connection = __connection__ name = StringCol(length=20) en = StringCol() fr = StringCol() class Automatic_payment_type(SQLObject): _connection = __connection__ name = ForeignKey('String') bill_msg = ForeignKey('String') If I change 'bill_msg' to 'bill_msg_id = IntCol()' everything works, but if I leave it as it is in this example, I'm getting the following error: ValueError: Unknown SQL builtin type: <class 'SQLObject.SQLObject.MetaSQLObject'> for <class 'plugins.tables.String'> Is there any clean way to do this? -- Dave Poirier Technology Integrator - Telecom Options Inc. phone: +1.204.233.6100 ext: 228 cell: +1.204.997.6253 fax: +1.204.257.2106 |