Replies: 1 comment
-
Try this: voted_player: "Player" = Relationship(sa_relationship_kwargs={"foreign_keys": [voted_player_id]}) to voted_player: "Player" = Relationship(sa_relationship_kwargs={"foreign_keys": "voted_player_id"}) |
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
When trying to have two references to a model as I have in the case of the Vote class to the player class where I want to know who voted but also to who that user voted I'm running into some relationship problems that are displaying that we don't offer the same
foreign_keys
field offered by SQLAlchemy, which would be the workaround for this?Operating System
macOS
Operating System Details
No response
SQLModel Version
0.0.16
Python Version
3.12
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions