You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a custom type CustomType with a distinct JSON and python validation schemas.
Create SQLModel subclass SQLModelTest with said custom type as an attribute.
SQLModelTest.model_validate_json, unlike the equivalent BaseModelTest.model_validate_json, uses the python validation schema instead of the JSON validation schema.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First Check
Commit to Help
Example Code
Description
CustomType
with a distinct JSON and python validation schemas.SQLModel
subclassSQLModelTest
with said custom type as an attribute.SQLModelTest.model_validate_json
, unlike the equivalentBaseModelTest.model_validate_json
, uses the python validation schema instead of the JSON validation schema.Operating System
Linux
Operating System Details
Fedora 39
SQLModel Version
0.0.14
Python Version
3.9.18
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions