there's an FAQ entry, a little bit dated but the general idea is still there, at:
https://docs.sqlalchemy.org/en/13/faq/ormconfiguration.html#i-m-getting-a-warning-or-error-about-implicitly-combining-column-x-under-attribute-y for joined table inheritance, where Name(Node) -> node_id are FK -> PK, the warning isn't emitted. so please share the mapping if it is doing this when it shouldnt. On Wed, Sep 2, 2020, at 9:08 PM, Richard Damon wrote: > I am getting the following error: > > SAWarning: Implicitly combining column Node.node_id with column > Name.node_id under attribute 'node_id'. Please configure one or more > attributes for these same-named columns explicitly. > > In my case I am using poymorphic classes by joining with the ORM. Node > is the base of the hierarchy (derived from declarative_base), then I > have a class Property derived from it, and a class Name derived from > Property. Each class has a primary_key named node_id, with a foreign key > constraint one step done the hierarchy. I have also tried making all the > Foreign key constraints point to Node.node_id and it doesn't make a > difference. > > It is just a warning, and the lookup does seem to make the double join, > so it doesn't seem to be a big problem, but it seems it want me to > configure something for these, but I am not sure what. > > Two level inheritance is working just fine, it is just where it hits the > 3rd level that it seems to want something explicit. > > -- > Richard Damon > > -- > SQLAlchemy - > The Python SQL Toolkit and Object Relational Mapper > > http://www.sqlalchemy.org/ > > To post example code, please provide an MCVE: Minimal, Complete, and > Verifiable Example. See http://stackoverflow.com/help/mcve for a full > description. > --- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sqlalchemy/8fa8e94d-cc6f-5bf5-efeb-dbdbae0d7663%40Damon-Family.org. > -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/e07cc259-2216-4ece-baf9-daabebf4ac00%40www.fastmail.com.
