On Feb 19, 2014, at 1:14 PM, Mariano Mara <[email protected]> wrote:

>    # relationships
>    runner = relationship("User", foreign_keys=[uid, oid],
>                          #primaryjoin=and_("Bet.uid==User.uid", 
> "Bet.oid==User.oid"),
>                          )
>    loader = relationship("User", foreign_keys=[loader_uid, oid])
> 

you’ve got the quoting off on that commented-out primaryjoin, here’s the most 
direct way to set it up:

    runner = relationship("User",
                     primaryjoin="and_(foreign(Bet.uid)==User.uid, 
foreign(Bet.oid)==User.oid)",
                     )
    loader = relationship("User",
                     primaryjoin="and_(foreign(Bet.loader_uid)==User.uid, 
foreign(Bet.oid)==User.oid)",
                        )




Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to