Hi All! How to set default join condition if table has more than one FK to another table?
It may be Transaction.user_id==User.id or Transaction.rollback_user_id==User.id, I want first one to be default, is it possible to do? transactions_table = sa.Table('transactions', meta.metadata, sa.Column('id', sa.types.Integer, primary_key=True), sa.Column('serial', sa.types.Integer, index=True, nullable=False), sa.Column('person_id', sa.types.Integer, sa.ForeignKey ('people.id'), index=True, nullable=False), sa.Column('user_id', sa.types.Integer, sa.ForeignKey(SYSTEM_SCHEMA +'.users.id'), index=True, nullable=False), sa.Column('service_id', sa.types.Integer, sa.ForeignKey ('services.id'), index=True, nullable=False), sa.Column('sum', sa.types.Integer, nullable=False), sa.Column('commit_date', sa.types.Date, index=True, nullable=False), sa.Column('commit_time', sa.types.Time, index=True, nullable=False), sa.Column('rollback_date', sa.types.Date, index=True, nullable=True), sa.Column('rollback_time', sa.types.Time, index=True, nullable=True), sa.Column('rollback_user_id', sa.types.Integer, sa.ForeignKey (SYSTEM_SCHEMA+'.users.id'), index=True, nullable=True) ) Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---