Hi, for implementation of a many to many relationship i create a second plain table which contains two columns from the same user table: user_target_table = Table("user_target", metadata, Column('user_id', Integer, ForeignKey('tg_user.user_id')), Column('target_id', Integer, ForeignKey('tg_user.user_id')), Column('relation_created', DateTime, onupdate = datetime.datetime.now, default = datetime.datetime.now) ) Yet i don't know how to declare the attribute in the User class: class User(Base): .............. target = relation("User", secondary = user_target_table, backref = "user") ..............
Is that correct? or needed being declared twice within it? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---