SQLAlchemy Automap does not create class for tables without primary key

Figured it out by combing through the reference/reframing the problem.

In case it helps someone else –

Because SQLAlchemy ORM is based on an identity map model, one cannot map (or automap) a table that does not have a primary key. An arbitrary primary key should be specified.

http://docs.sqlalchemy.org/en/latest/faq/ormconfiguration.html#how-do-i-map-a-table-that-has-no-primary-key

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)