Infer relation attributes from column foreignKey (or vice versa) #109
IlyaSemenov
started this conversation in
Ideas
Replies: 1 comment
-
|
It requires some research and TS performance considerations, and I'm leaving it for the future. |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I stumbled upon repetitive boilerplate when defining foreign keys. Consider user-posts models:
In the code above, user has to couple
UserTable.idwithPostTable.user_idtwice: first incolumns, then inrelations. What if this could be optionally automated/inferred?Such as with:
or:
(Ugly naming intended for demonstration purposes.)
Beta Was this translation helpful? Give feedback.
All reactions