This issue seems to be caused by a change in SQLObject.
The change in behaviour seems to be due to a change made in SQLObject in main.py, where the ‘idName’ attribute was taken out of a list of unshared attributes. This caused the sqlmeta class to share the idName value with its containing class, so they both end up with ‘id’ even when longID is set to true in your own class. If you add it back in:
_unshared_attributes = ['table', 'columns', 'childName', 'idName']
then it should work as before...however, I'm not sure if this will cause other problems (so far it seems to work).
It seems that the longID feature is broken unless this little change is made. OR, are we misunderstanding the "new" way to make longID work properly?
By the way, here is a link to a change that seems to have triggered this change in behaviour:
From: Sam's Lists [mailto:email@example.com]
Sent: Wednesday, June 10, 2009 9:06 PM
Subject: [SQLObject] longId=True handling...
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:
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
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?