Replies: 1 comment 1 reply
-
Hi @emilhe, I'am encountering the same problem as you described. Where you able to solve this? |
Beta Was this translation helpful? Give feedback.
1 reply
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
I am trying to bind nested models to a JSON field. The serialization/deserialization process works as expected when
table=False
, but when i settable=True
, the deserialization is no longer working as intended. In both cases, the serialized form is,When
table=False
the deserialization yields,as exptected. However, when i set
table=True
, the nested model (here, theanimal
field) ends up as adict
instead of an object of the intended type (here,Cat
),I found some related discussions, #63 and #52, that indicates that this behavior may be related to issues with pydantic model validation.
Now, my question is - is there any (proper) way to mitigate this issue?
Operating System
Linux
Operating System Details
No response
SQLModel Version
0.0.18
Python Version
Python 3.12.0
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions