tContact = Table('contact', metadata, Column('user_id', Integer, ForeignKey('user.user_id'), Column('contact_id', Integer, ForeignKey('user.user_id') )
class User(DeclarativeBase): __table_name__ = 'user' user_id = Column(Integer, autoincrement=True, primary_key=True) name = Column(Unicode(80)) contacts = relation('User', secondary=tContact) I know the statement "contacts = relation" is wrong. I have poured over examples and cannot seem to fathom how to do this relationship in DeclarativeBase. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@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 -~----------~----~----~----~------~----~------~--~---