Auto updating columns don't work with SQLModel docs on updates #782
Unanswered
Ben-Epstein
asked this question in
Questions
Replies: 2 comments
-
I don't know the answer here at all, but I am wondering if
would work? I'm just starting to use SQLModel and also trying to figure out where/how to best specify these things. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think the following works and is a pretty clean solution?
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
With the code above, which
The
updated_at
field should auto update, but it's not doing so. I think the way you'd need to do this is to create a new instance ofSimpleTable
, which will create a newupdated_at
value. But there are no docs on the right way to do that. So i suspect people are doing what I've done above and silently not getting theupdated_at
field to work.Operating System
macOS
Operating System Details
No response
SQLModel Version
0.0.14
Python Version
Python 3.9.8
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions