# Only form model classes for tables that have a primary key and are not association tables
if not table.primary_key or table.name in association_tables:
model = ModelTable(table)
else:
model = ModelClass(table, links[table.name], inflect_engine, not nojoined)
classes[model.name] = model
И как сделать так, чтобы любая таблица из MySQL генерилась в виде классов?
select members.id, members.name from members
inner join members_teams on members.id = members_teams.member_id
where members_teams.team_id NOT IN (1)