title: SQLAlchemy - How to map ManyToMany using autoloaded association tables
body: <p>I am autoloading an MSSQL db.  There are a few ManyToMany assoc tables.  I'm not sure how to map each side.  Here's a typical example of how they look in the db:</p>
  
  <pre><code>Table: tbUsersToGroups
  PK: ID_UserToGroup
  FK: User_ID
  FK: Group_ID
  </code></pre>
  
  <p>So I can successfully autoload that assoc table and the Users and Groups tables per below, but everything I've tried to map the sides has failed.</p>
  
  <pre><code>class UserToGroup(Base):
      __tablename__ = 'tbUsersToGroups'
      __table_args__ = {'autoload':True,'extend_existing':True,'schema':'dbo'}
  </code></pre>
  
  <p>and</p>
  
  <pre><code>class User(Base):
      __tablename__ = 'tbUsers'
      __table_args__ = {'autoload':True,'schema':'dbo'}
  </code></pre>
  
  <p>and</p>
  
  <pre><code>class Group(Base):
      __tablename__ = 'tbGoups'
      __table_args__ = {'autoload':True,'schema':'dbo'}
  </code></pre>
  
  <p>Any help would be great.</p>