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
{{ message }}
Repository navigation
Return a Column class for relationship attributes that require it #107
### Description
Use models such as above will result in the following error because the `foreign_keys` argument expects a `Column` (not a SQLModel `Field`).
As such, its impossible right now for anyone to deploy classes with multiple FKs to the same identity and/or use custom named foreign key columns.
### Wanted Solution
To be able to specify foreign keys to the same related entity and/or name my fk columns however I choose.
### Wanted Code
```python
Just like above
Activity
ohmeow commentedon Sep 20, 2021
Maybe something like this would work ...
pmarcelll commentedon Mar 26, 2022
I've encountered the same issue and after reading this SQLAlchemy guide I've managed to work around it.
Based to the guide your code should look like this:
alextremblay commentedon May 28, 2024
it would be nice if
Relationshiphad alocal_keyparam to handle this, to avoid a lot of boilerplate.Ex, instead of
It would be nice to be able to write