Re: [sqlalchemy] Custom secondary relation with composite primary keys

2017-05-01 Thread mike bayer
On 04/28/2017 09:49 PM, Alex Plugaru wrote: Hello, There are 3 tables: `*Account*`, `*Role*`, `*User*`. Both `*Role*` and `*User*` have a foreign key `*account_id*` that points to `*Account*`. A user can have multiple roles, hence the `*roles_users*` table which acts as the secondary relat

[sqlalchemy] Custom secondary relation with composite primary keys

2017-04-28 Thread Alex Plugaru
Hello, There are 3 tables: `*Account*`, `*Role*`, `*User*`. Both `*Role*` and ` *User*` have a foreign key `*account_id*` that points to `*Account*`. A user can have multiple roles, hence the `*roles_users*` table which acts as the secondary relation table between `*Role*` and `*User*`. The `*