SQLalchemy not find table for creating foreign key

前端 未结 3 620
别那么骄傲
别那么骄傲 2021-02-03 20:28

I have a problem with SQL Alchemy, while trying to create a database, i get:

\"sqlalchemy.exc.NoReferencedTableError: Foreign key associated with column \'estate         


        
3条回答
  •  不思量自难忘°
    2021-02-03 21:21

    By adding the following line to my parent table solved my problem. In case of Declarative:

    children = relationship("Child")
    

    Otherwise: SQLAlchemy - Classic Mapper

    Also try to have a look in here (SO) too, might help.

提交回复
热议问题