Re: [sqlalchemy] Re: Generic Associations - table_per_association: parent attribute

2018-07-30 Thread Mike Bayer
the discriminator_on_association example http://docs.sqlalchemy.org/en/latest/_modules/examples/generic_associations/discriminator_on_association.html illustrates how to have a .parent link. On Mon, Jul 30, 2018 at 5:48 AM, Simon King wrote: > You could build this, but it's going to be messy. At

Re: [sqlalchemy] Re: Generic Associations - table_per_association: parent attribute

2018-07-30 Thread Simon King
You could build this, but it's going to be messy. At the SQL level, if you look at an Address row, there's not enough information to know which association table to look in. You'd have to query all of the association tables (perhaps using a UNION) to find the one that contains the parent, and then