On Wed, Dec 9, 2020 at 11:44 AM Larry Martell <larry.mart...@gmail.com> wrote: > > When I run sqlacodegen on my DB it creates classes for most of the > tables, but for some it creates only Table objects. I don't see any > rhyme or reason as to why it does this for some. How can I get to > generate classes for all the tables?
I found this: https://stackoverflow.com/questions/34675604/sqlacodegen-generates-mixed-models-and-tables/35916967 that says it generates Table objects if there is no PK. But the ones it generated Table objects for do have PKs, e.g.: t_BusinessAreaContact = Table( 'BusinessAreaContact', metadata, Column('businessAreaID', ForeignKey('BusinessArea.businessAreaID'), primary_key=True, nullable=False), Column('contactEmail', ForeignKey('Contact.contactEmail'), primary_key=True, nullable=False) ) -- 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 sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/CACwCsY6PqDYBYPNE-Ft7nBucP2XELV24er5rs9i%3Dj%2Bmy-8Ndkg%40mail.gmail.com.