OK, that is another problem to avoid, if you have two ORM models in different .py files, you need to make sure both .py files have been imported before you can use the mappings or do things like create_all(). from that description it sounds like your "deal" model wasn't imported.
there's not really any way for SQLAlchemy to avoid that issue, perhaps for this error message a link to a documentation section that lists out all the possibilities can be added. On Sun, Aug 4, 2019, at 8:58 AM, Abhishek Sharma wrote: > I am able to figure out the issue but still I am not sure what caused that, I > moved the relationship from deal model to deal_term_rate_options model with > backref option and now I can see my table deal.deal in metadata, I am > guessing may be some circular dependency was there which may be causing this. > > -- > 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/c34618d8-2a57-459c-9fe9-f8d949d8c739%40googlegroups.com. > -- 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/ed0280ea-30ef-4c14-bed4-1ff80ca37711%40www.fastmail.com.
