From: Sam's L. <sam...@gm...> - 2009-06-11 01:06:19
|
I posted this on the TurboGears mailing list but now I'm posting it here in hopes for more help. Essentially I am upgrading from SQLObject 0.7.1dev_r1653 and MySQL 4.x something to MySQL 5 something and SQLObject 0.10.6 I have this very complicated legacy TurboGears application that I'm tasked with upgrading to 1.0.8 which has laid stagnant since the days of early .99 series. The original author used the following a lot in his table definitions: class sqlmeta: style = MixedCaseStyle(longID=True) What this means is that instead of the id column being named 'id' it takes on the name of the table...so if the table is called EventQueue, the id column name is EventQueueID. So far so good....but here's where it gets weird. It appears that under the really old versions of TurboGears one could refer to this EventQueueID as just .id and everything would work the way you want it to. (This appears to only be done in the app under kid templates). But now, under TG 1.0.8/the latest version of SQLObject that doesn't work. Either I have to rename the column to id or I have to refer to it as EventQueueID. How can I make sqlObject seemlessly let me refer to columns named in the long style just using id? Thanks |