This works:
Seller = aliased(Dealer)
Buyer = aliased(Dealer)
q = self.session.query(Car, Seller.name, Buyer.name)
q = q.outerjoin((Car.seller, Seller), (Car.buyer, Buyer))
This doesn't:
Seller = aliased(Dealer)
Buyer = aliased(Dealer)
q = self.session.query(Car, Seller.name, Buyer.name)
q = q.outerjoin(Car.seller, Seller)
q = q.outerjoin(Car.buyer, Buyer)
sqlalchemy.exc.ArgumentError: Can't determine join between 'Join object on
cars(71352432) and dealers(71704656)' and '%(78454064 dealers)s'; tables have
more than one foreign key constraint relationship between them. Please specify
the 'onclause' of this join explicitly.
Is this by design?
Thanks,
Michael
--
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.