Re: [sqlalchemy] relationship without using a column value (using table name)?

2020-03-14 Thread Mike Bayer
this is called a "Generic foreign key" and it's not really a real relational database pattern. There are a series of examples in https://docs.sqlalchemy.org/en/13/orm/examples.html#module-examples.generic_associations that show four different ways to achieve this pattern, one of which is the "g

[sqlalchemy] relationship without using a column value (using table name)?

2020-03-14 Thread Mark Aquino
Is it possible to create a relationship via the table name as the "foreign key"? I tried playing around with the foreign and remote options and tried utilizing what's described here: https://docs.sqlalchemy.org/en/13/orm/join_conditions.html#non-relational-comparisons-materialized-path but I c