title: How to update table row with SQLAlchemy?
body: <p>I want to update a row of a table.</p>
  
  <p>To add I used,</p>
  
  <pre><code>session.add(unit) #here unit is unit object of class unit
  session.commit()
  </code></pre>
  
  <p>To update I tried,</p>
  
  <pre><code>session.merge(unit)
  session.commit()
  </code></pre>
  
  <p>However, in the database there are other columns, e.g. <code>create_by</code>, <code>created_on</code>, <code>updated_on</code>, which are not set in the unit object, so these are set NULL upon the merge.</p>