yeah i can tell you exactly why this is this way. when the backref is created, the 0.1 series just re-used the join conditions from the original relation (in the case of a primary and secondary join on a many-to-many, it reverses them). in 0.2 there were some problems with that....more complicated customized join conditions dont necessarily apply in reverse. so for the moment you have to go more explicitly, if you have explicit join conditions: properties = { 'payer' : relation( Account, primaryjoin=(\ accounts.c.payer_id==people.c.id), backref=backref('payer_', primaryjoin=accounts.c.payer_id==people.c.id)), 'reciever' : relation( Account, primaryjoin=(\ accounts.c.reciever_id==people.c.id), backref=backref('reciever_', primaryjoin=accounts.c.reciever_id==people.c.id))} also the "foreignkey" parameter is usually not needed unless youre doing a self-referential mapper. On Jul 20, 2006, at 11:14 AM, Vasily Sulatskov wrote:
|
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Sqlalchemy-users mailing list Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users