Replies: 2 comments
-
@konkyrkos Any chance you may have figured this out? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Would you please offer a minimal reproducible example? An example that uses sqlite and can be directly run, and print the result, and you can tell us what result you expected. I guess this is because sqlmodel dosen't validate data, so maybe #1041 could work, but I need an example to try. |
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
We are trying to update to pydantic v2 (from v1) and latest versions of sqlmodel and sqlalchemy. We have two models connected by a relationship. We want to get a model as a dict along with its relationships (as keys of the dict too). We use club.model_dump(inlcude={'id', 'uid', 'name', 'members'}). In the past instead of .model_dump we used .dict() with the same parameters it worked. Now model_dump method does not work and does not return the relationships as keys of the dict. We have tried various options of the method but nothing did the trick.
Any help and interest in the issue is welcome!
Thank you in advance.
Operating System
macOS
Operating System Details
No response
SQLModel Version
0.0.21
Python Version
3.10.5
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions