title: Many to Many using foreign_keys option
body: <p>I need to create a many to many relationship between two tables. I need to specify the <code>foreign_keys</code> option because I have other references in both tables to each other.</p>
  
  <p>Tried multiple approaches using <code>Class</code> declaration of the assiciation table and <code>Table</code> object directly.</p>
  
  <p>When I remove the <code>foreign_keys</code> option on both <code>User and</code>Feature` class, it works but when I add other fields with mappings between these two classes, I get the Multiple paths exception.</p>
  
  <pre class="lang-py prettyprint-override"><code>feature_user = Table(
      'feature_user',
      Base.metadata,
      Column('feature_id', Integer, ForeignKey('features.id')),
      Column('user_id', Integer, ForeignKey('users.id')),
  )
  
  class Feature(Base):
      __tablename__ = 'features'
  
      id = getIdColumn()
  
      # other fields...
  
      cpm_engineers = relationship(
          'User',
          secondary=feature_user,
          foreign_keys=[feature_user.columns.user_id],
          back_populates='cpm_engineer_of',
      )
  
  class User(Base):
      __tablename__ = 'users'
  
      id = getIdColumn()
  
      # other fields...
  
      cpm_engineer_of = relationship(
          'Feature',
          secondary=feature_user,
          foreign_keys=[feature_user.columns.feature_id],
          back_populates='cpm_engineers',
      )
  </code></pre>
  
  <p>When creating a new <code>User</code> of a <code>Feature</code>, I get the following error:
  <code>sqlalchemy.exc.NoForeignKeysError: Could not determine join condition between parent/child tables on relationship Feature.cpm_engineers - there are no foreign keys linking these tables via secondary table 'feature_user'.  Ensure that referencing columns are associated with a ForeignKey or ForeignKeyConstraint, or specify 'primaryjoin' and 'secondaryjoin' expressions.</code></p>