[SQLObject] Select does not work with some fieldname
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Wolfgang M. <wol...@gm...> - 2009-11-08 20:45:48
|
Hi,
please help.
how do i this SQL
SELECT *
FROM `TAthlet`
WHERE TCountry_id = 'AUT'
The table "TAthlet" have this fields:
TUnion_id
id
short
name
TGender_id
TGoup_id
TCountry_id
This does not work:
from sqlobject import *
sqlhub.processConnection =
connectionForURI('mysql://archer:xxxxxx@localhost/adb')
class TAthlet(SQLObject):
class sqlmeta:
#if i dont do this i get a wrong tathlet table
table = "TAthlet"
fromDatabase = True
TAthlet._connection.debug = True
r = TAthlet.select(TAthlet.q.Tcountry_id=='AUT')
The Error:
AttributeError: TAthlet instance has no attribute 'Tcountry_id'
Thanks
Wolfgang Morawetz
|