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
Im running very simple example code (basically taken from tutorial.
I thought there are 2 ways of creating relationship.- using team or team_id (One hero instance creating is commented out).
The problem is that when I run the code above, Relationship is not created, and team_id of object hero_db is NULL.
Removing model_validate from the code resolves the problem, but in more complex examples, it is required to properly parse input.
Am I doing something wrong or is it really bad bug? Because I cant imagine passing the entire objects instead of IDs is a must for bigger objects.
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
Im running very simple example code (basically taken from tutorial.
I thought there are 2 ways of creating relationship.- using
team
orteam_id
(One hero instance creating is commented out).The problem is that when I run the code above, Relationship is not created, and team_id of object hero_db is NULL.
Removing model_validate from the code resolves the problem, but in more complex examples, it is required to properly parse input.
Am I doing something wrong or is it really bad bug? Because I cant imagine passing the entire objects instead of IDs is a must for bigger objects.
Operating System
macOS
Operating System Details
No response
SQLModel Version
Name: sqlmodel Version: 0.0.22
Python Version
Python 3.12.7
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions