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
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.
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
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