If I create the following model.py, when I'm running "tg_admin sql
create" I receive an error saying that users is not created yet.
<code>
class Users(SQLObject):
_connection = hub
userid = StringCol(alternateID=True, length=100)
projects = MultipleJoin('Projects', joinColumn='projects_id')
class Projects(SQLObject):
_connection = hub
name = StringCol(alternateID=True,length=100)
owner = ForeignKey ('Users')
category = ForeignKey ('Categories')
class Categories(SQLObject):
_connection = hub
catid = IntCol(alternateID=True)
name = StringCol(length=50,alternateID=True)
projects = MultipleJoin('Projects', joinColumn='projects_id')
</code>
If I do the following, it works ;-(.
<code>
class B_Users(SQLObject):
_connection = hub
userid = StringCol(alternateID=True, length=100)
projects = MultipleJoin('C_Projects', joinColumn='c_projects_id')
class C_Projects(SQLObject):
_connection = hub
name = StringCol(alternateID=True,length=100)
owner = ForeignKey ('B_Users')
category = ForeignKey ('Categories')
class A_Categories(SQLObject):
_connection = hub
catid = IntCol(alternateID=True)
name = StringCol(length=50,alternateID=True)
projects = MultipleJoin('C_Projects', joinColumn='c_projects_id')
</code>
Is there a way to give the "create sequence" to "tg_admin sql create" ?
PS:
I'm with TG 0.8a3 and postgres 8.0.2
Thanks