Replies: 1 comment
-
I found the problem but I don't know if it should be considered as a bug or a misusage. |
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
It's the first time I use the lib so there is a very high chance the mistake is coming from my side. I followed the tutorial and slightly adapted it to my need. For the classCropStage, I would like to have 3 columns
short
,name
andinfo
. As described in the documentation (https://sqlmodel.tiangolo.com/tutorial/automatic-id-none-refresh/), I set up the id column as:The problem is raised when I try to commit at the end of the session as the database is complaining that the id is not set:
I thought the autoincrement stage was part of sqlmodel, was I wrong ?
Operating System
Linux
Operating System Details
No response
SQLModel Version
0.0.19
Python Version
3.10
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions