Replies: 2 comments 5 replies
-
Same for me (with version 0.0.22) |
Beta Was this translation helpful? Give feedback.
5 replies
-
Not sure if this is still an issue or not, but I found this searching for the same problem. We found this is related to some kind of lazy evaluation of the validator. If you edit any one member of the model before inspecting it then you do see the model level validation happening. Feels relatively bug like as you'd expect at init time or shortly after for this to happen and not require any further editing of data. Hope this helps someone. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
Hi,
I'm having problems migrating to pydantic v2. I have some logic in @root_validator for data that should be stored in the database. However, when using pydantic v2 and SQLModel with
table=True
the new @model_validator is not called. Everything works fine whentable=False
.Is this a bug or am I doing something wrong?
Best
Eric
Operating System
Linux
Operating System Details
No response
SQLModel Version
0.0.14
Python Version
Python 3.12.1
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions