Re: [sqlalchemy] Help resolving Could not determine join condition between parent/child tables on relationship error message

2018-02-08 Thread Jeremy Flowers
> > I reposted this on Stack Overflow - and solved my own question in this > instance with a bit of Google Kung Fu https://stackoverflow.com/questions/48666026/sqlalchemy-could-not-determine-join-condition-between-parent-child-tables-on-re/48672033#48672033 -- usrms

Re: [sqlalchemy] Help resolving Could not determine join condition between parent/child tables on relationship error message

2018-02-07 Thread Mike Bayer
On Wed, Feb 7, 2018 at 6:01 AM, Jeremy Flowers wrote: > Hi > I've recently used sqlacodegen > > When I try and run against the generated code it get this message that I've > been unable to fix: > > Could not determine join condition between parent/child tables on > relationship Workgrp.usrmst - t

Re: [sqlalchemy] Help resolving Could not determine join condition between parent/child tables on relationship error message

2018-02-07 Thread tonthon
Hi, When SQALchemy can't guess the join condition to use for a relationship, you have to use the primaryjoin parameter : ursmst = relationship('Usrmst', primaryjoin="Workgrp.workgrp_owner==Usrmst.id") Hope this helps. Regards Gaston Le 07/02/2018 à 12:01, Jeremy Flowers a écrit : > Hi > I've

[sqlalchemy] Help resolving Could not determine join condition between parent/child tables on relationship error message

2018-02-07 Thread Jeremy Flowers
Hi I've recently used sqlacodegen When I try and run against the generated code it get this message that I've been unable to fix: Could not determine join condition between parent/child tables on relationship Workgrp.usrmst - there are multiple foreign key paths linking the tables. Specify th