SQLObject - Connect to established DB with non-int 'id' field

Diez B. Roggisch deets at nospam.web.de
Sat Oct 20 02:51:02 EDT 2007


Sean DiZazzo schrieb:
> Hi all,
> 
> I am just beginning with TurboGears and have run into a problem with
> SQLObject.
> 
> I'm trying to connect to an established mysql DB, and use TurboGears
> to display results from the DB only.  The problem is that the DB
> already has an 'id' field that is a string as opposed to an int.
> SQLObject complains because it wants to use the id field for it's own
> purposes.
> 
> How can I use TurboGears to get data out of this DB?

http://sqlobject.org/FAQ.html#non-integer-ids

While I personally prefer SQLObject over SQLAlchemy, the latter has 
better legacy-database-support. Maybe a switch would be the better solution.

Diez



More information about the Python-list mailing list