Skip to content
Advertisement

How to Update in sqlalchemy using objects?

I have a student table in postgres with the following columns Studentid | Student_name | Student_division

I am using sql alchemy and have modeled it as

JavaScript

How to update? This doesnt work.

Advertisement

Answer

you need to commit the changes and remove the session.add(x)

just keep session.commit()

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement