Suppose now I have to "addColumn", then I get a KeyError:
"dir(Country.q)" does not contain 'name'.

------------------------------------------------------------------------------
class Entity(so.inheritance.InheritableSQLObject):
        #name = so.UnicodeCol(notNone=1)
        pass
class Country(Entity):
        code = so.StringCol(length=2) # iso3166-1 Alpha-2

Entity.sqlmeta.addColumn(so.UnicodeCol('name', notNone=1))
Entity.createTable(ifNotExists=True)
Country.createTable(ifNotExists=True)
------------------------------------------------------------------------------
[<Country 1 code='CH' name=u'Switzerland'>, <Country 2 code='ZA'
name=u'South Africa'>]
Traceback (most recent call last):
  File "test/inh.py", line 24, in ?
    print list(Country.select(orderBy=Country.q.name))
  File "lib\SQLObject-0.7.0-py2.4.egg\sqlobject\sqlbuilder.py", line
362, in __getattr__
KeyError: 'name'
------------------------------------------------------------------------------


--
jt
N�HY޵隊X���'���u���[�������
ަ�k��!���W�~�鮆�zk��C� [EMAIL PROTECTED],����a{�
��,�H��4�m�����Z��jY�w��ǥrg

Reply via email to