On Wed, Nov 08, 2006 at 06:57:50PM -0500, Chuck Winters wrote:
> class B( SQLObject ):
>   class sqlmeta:
>     table = 'B'
>     idName = 'b_id'
> 
>   bAfk  = ForeignKey( 'A', dbName='b_afk', default=None )
>   bName = StringCol( length=25, dbName='b_name', default='B Name' )
>   bDesc = StringCol( length=25, dbName='b_desc', default='B Desc' )
[skip]
>   bs = B.select( B.q.bAfk == a )
[skip]
> Traceback (most recent call last):
>   File "./SqlTest.py", line 31, in ?
>     bs = B.select( B.q.bAfk == a )
>   File
> "/usr/lib/python2.4/site-packages/SQLObject-0.7rc1-py2.4.egg/sqlobject/sqlbuilder.py",
>  line 360, in __getattr__
>     self.soClass.sqlmeta.columns[attr].dbName,
> KeyError: 'bAfk'

print B.sqlmeta.columns
   =>
{'bDesc': <SOStringCol bDesc default='B Desc'>, 'bName': <SOStringCol bName
default='B Name'>, 'bAfkID': <SOForeignKey bAfkID default=None connected to A>}

   Style object has changed the name of the column to "bAfkID".

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to