I want to create a table, say: employee_table = Table( 'employee',metadata, Column('id',Integer,primary_key=True), Column('name',String(255)) ) staffGroup_Table = Table( 'role',metadata, Column('manager',None,ForeignKey('employee.id')), Column('worker',None,ForeignKey('employee.id')), Column('janitorr',None,ForeignKey('employee.id')) ) metadata.create_all()
however this will generate circular dependency, I tried to use use_alt = True with ForeignKey constraint , but no luck. What is the correct way of creating table for this kind of situation : "a table refers to another table with a composite foreign keys on the same column?" Thank you! -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.