I have a method into my Repository class that receives a object that was not loaded from database but is populated with the right id and I want to update it into the database:
class Repository(object):
def __init__(session):
self.session = session
def update(self, car):
self.session.update(car)
There is no method update into session. Also if I use add method the record is not updated.
How can I update the object with SQLAlchemy?