Werner F. Bruhin wrote: ... My problem was that I had two foreign key columns which related to the same table.
Initially I didn't see that hint in the exception message. So changing my mapper to include a primaryjoin as follows solved the problem. preferences = sao.mapper(Preferences, preferences_table, properties={ 'language': sao.relation(Language, backref='preferences'), 'imagetype_ls': sao.relation(Imagetype_ls, primaryjoin= (preferences_table.c.fk_imagetypeid==Imagetype_ls.c.imagetypeid)), 'imagetype_ls2': sao.relation(Imagetype_ls, primaryjoin= (preferences_table.c.rec_fk_imagetypeid==Imagetype_ls.c.imagetypeid)), }) Werner > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---