How to get the original value of changed fields?
I'm using sqlalchemy as my orm, and use declarative as Base. Base = declarative_base() class User(Base): __tablename__ = 'users' id = Column(Integer, primary_key=True) name = Column(String) My question is, how do I know a user has been modified, and how to get the original values without query database again? user = Session.query(User).filter_by(id=user_id).first() # some operations on user .... # how do I know if the user.name has been changed or not? ... # How do get the original name? Thanks in advance! UPDATE I found a method get_history can get the history value of a field, but I'm not