title: SQLAlchemy PostgreSQL Pyramid update issue
body: <p>I have the following model:</p>
  
  <pre><code>class Employee (Base):
      __tablename__ = 'employees'
  
      id       = Column(Integer, primary_key=True, autoincrement=True)
      name     = Column(String(300), unique=True, nullable=False)
      phone_a  = Column(String(20), nullable=False)
      phone_b  = Column(String(20))
      email_a  = Column(String(400), nullable=False)
      email_b  = Column(String(400))
      address  = Column(String)
      charge   = Column(String(100), nullable=False)
      active   = Column(Boolean, default=True)
  
      created  = Column(DateTime, nullable=False, default=datetime.datetime.now)
      modified = Column(DateTime, onupdate=datetime.datetime.now)
  
      def __init__(self):
          self.active  = True
          self.created = datetime.datetime.now()
  
      def __unicode__(self):
          return self.name
  </code></pre>
  
  <p>I wrote the add view for it, very basic:</p>
  
  <pre><code>employee = Employee()
  form     = Form(request, EmployeeSchema(), obj = employee)
  
  if form.validate():
      employee = form.bind(Employee())
      try:
          DBSession.add(employee)
          DBSession.flush()
          return HTTPFound(location = request.route_url('employees'))
      except IntegrityError:
          message = 'Oops!'
  </code></pre>
  
  <p>And it works well. But the UPDATE view doesn't. I just does not save. According to the tutorial basically with the same code it should work. But it doesn't, SQLAlchemy tries to insert a new object instead of just updating it. I tried</p>
  
  <pre><code>import transaction
  transaction.commit()
  </code></pre>
  
  <p>But no success.</p>
  
  <pre><code>_id = request.matchdict['employeeid']
  employee = DBSession.query(Employee).filter_by(id=_id).first()
  form     = Form(request, EmployeeSchema(), obj = employee)
  
  if form.validate():
      employee    = form.bind(Employee())
      try:
          DBSession.add(employee)
          return HTTPFound(location = request.route_url('employees'))
      except IntegrityError:
          message = ''
  </code></pre>