title: SQLAlchemy changing table name to have two underscores
body: <p>In my Flask/SQLAlchemy project, I have an index table called Styles_Index, which has a corresponding table object that I query on.
  The schema in sqlite3 looks like</p>
  
  <pre><code>CREATE TABLE Styles_Index
  (
      beer_id integer not null, 
      style_id integer not null, 
      primary key (beer_id, style_id)
  );
  </code></pre>
  
  <p>And the object in python looks like</p>
  
  <pre><code>class Styles_Index(db.Model):
      beer_id = db.Column(db.Integer, db.ForeignKey('beers.id'),
              primary_key = True)
      style_id = db.Column(db.Integer, db.ForeignKey('styles.id'),
              primary_key = True)
  </code></pre>
  
  <p>When I try to join the table onto another that shares a common key via the SQLAlchemy BaseQuery.join(), it creates a query:</p>
  
  <pre><code>SELECT styles__index.id AS styles__index_id, 
      styles__index.beer_id AS styles__index_beer_id, 
      styles__index.style_id AS styles__index_style_id
      FROM styles__index JOIN styles ON styles__index.style_id = styles.id
      LIMIT ? OFFSET ?
  </code></pre>
  
  <p>where Styles_Index has two underscores instead of one.
  Is this an intentional design choice due to the _ wildcard character in SQL? Is there a better way to write this query, without resorting to writing raw SQL?</p>