I have the following mapping (straight from SA examples):
class User(Base): __tablename__ = \'users\' id = Column(Integer, primary_key=True) name =
Merge the session.
u = session.query(User).get(id) u.name = 'user1_changed' u = session.merge(u)
This will update the database and return the newer object.