session.delete(a)
sqlalchemy.orm.session.make_transient(a)
a.name, b.name = b.name, a.name
session.flush()
session.add(a)
session.commit()
How can I switch two fields of a unique row within one commit using SQLAlchemy?