session.query(
UserModel
).filter(
UserModel.id == 20
).update({
UserModel.username: 'john_deo',
UserModel.email: '[email protected]',
UserModel.city: 'New York'
})
session.commit()
In the code snippet, we are updating the User's email, username, the city which has id 20.
0 Comments