With Relationship field filled but empty foreign_key validate raise ValidationError #785
Unanswered
mlachowski
asked this question in
Questions
Replies: 0 comments
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
model_validate
on Child with following data{"name": "Deadpond child", "hero": hero}
hero_id
What is the best approach for this? Should I always populate the
_id
field instead of Relationship field with whole entity? Or maybe the SQLModel should populate the_id
field internally for validation purpose?Operating System
Windows
Operating System Details
No response
SQLModel Version
0.0.14
Python Version
Python 3.11.7
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions