Which sqlAlchemy can be used to apply onupdate function and not to wait for session to be closed?

22 Views Asked by At

Hi I've seen that onupdate function is not applied until the session is closed and I would like if there is any way to update db and use the onupdate function in the middle of a process.

I've tried with commit and flusk but no results...

created = Column(DateTime, default=datetime.datetime.now, index=True)
updated = Column(DateTime, onupdate=datetime.datetime.now, index=True)
0

There are 0 best solutions below