On Fri, Mar 02, 2007 at 05:12:22PM +0200, Nikolas Psaroudakis wrote:
> ------------------------------------------------------------------------------------------------
> from sqlobject import *
> connection_string = 'mysql://root:[EMAIL PROTECTED]/kway'
> connection = connectionForURI(connection_string)
> sqlhub.processConnection = connection
>
> class Contact(SQLObject):
> name=StringCol()
> surname=StringCol()
>
> class Person(SQLObject):
> name=StringCol()
> surname=StringCol()
> tel=StringCol(default=None)
> mobile=StringCol(default=None)
> fax=StringCol(default=None)
> email=StringCol(default=None)
> father=StringCol(default=None)
> mother=StringCol(default=None)
> adt=StringCol(default=None)
> afm=StringCol(default=None)
> contact=ForeignKey('Contact')
>
> class Address(SQLObject):
> street=StringCol()
> number=StringCol()
> city=StringCol()
> zip=StringCol(default=None)
> person=ForeignKey('Person')
>
> --------------------------------------------------------------------------------------------------------------------------------
> When I try Contact.createTable() everything is OK.
> But when I subsequently try Person.createTable() I get the following error
The program (including three .createTables() calls) works for me on
SQLite and Postgres, with SQLObject 0.7.3 and 0.8.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss