title: Weird type error arising when I add to a database using SQL Alchemy
body: <p>I've just started using the SQLAlchemy package for python to maintain a simple sqlite3 database for some experiments. This bug took me a while to figure out so I thought I'd post it up. There are probably better approaches to the one I found as well. I'm using Python 2.7.2.</p>
  <p>The problem arises when I have an Integer Column in a class matching a table in the database such as this simple Featdata class.</p>
  <pre><code>class FeatData(Base):
    __tablename__ = 'featdata'
  
    id = Column(Integer, primary_key=True)
    name = Column(String)
    value = Column(Integer)
    order = Column(Integer)
  </code></pre>
  <p>When I try to add records to the table I'm doing some other manipulation on the data, not really what is shown here but this code generates the same bug. I'm sorting the entries first and using the output of that sort to fill the column values.</p>
  <pre><code>engine = create_engine('sqlite:///:memory:', echo=True)
  Base.metadata.create_all(engine)
  
  Session = sessionmaker(autoflush=False, bind=engine)
  session = Session()
  
  featnames=['thing','widget','dongle']
  featvalues=[87,2,15]
  newobjects=[]
  
  for i in numpy.argsort(featvalues):
    newobjects += [FeatData(name=featnames[i], value=featvalues[i], order = i) ]
  
  session.add_all(newobjects)
  session.commit()
  </code></pre>
  <p>I get the following error messages, there is something wrong with the types in here somewhere. Any ideas?</p>
  <p>Error messages:</p>
  <blockquote>
  <p>2014-03-28 06:50:14,376 INFO sqlalchemy.engine.base.Engine BEGIN (implicit)</p>
  <p>2014-03-28 06:50:14,377 INFO sqlalchemy.engine.base.Engine INSERT INTO featdata (name, value, &quot;order&quot;) VALUES (?, ?, ?)</p>
  <p>2014-03-28 06:50:14,377 INFO sqlalchemy.engine.base.Engine ('widget', 2, 1)</p>
  <p>2014-03-28 06:50:14,378 INFO sqlalchemy.engine.base.Engine ROLLBACK</p>
  <p>...</p>
  <p>File &quot;/Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/SQLAlchemy-0.9.3-py2.7-macosx-10.5-i386.egg/sqlalchemy/engine/default.py&quot;, line 425, in do_execute</p>
  <pre><code>cursor.execute(statement, parameters)
  </code></pre>
  <p>sqlalchemy.exc.InterfaceError: (InterfaceError) Error binding parameter 2 - probably unsupported type. u'INSERT INTO featdata (name, value, &quot;order&quot;) VALUES (?, ?, ?)' ('widget', 2, 1)</p>
  </blockquote>