Implicit many-to-many schema
I would like to define many many-to-many relations with a more terse syntax.
I have a database with many many-to-many relations (~30). They are very basic in the sense that the join tables only contain 2 columns - the ids from left and right.
Coming from prisma, I could make implicit many-to-many tables with 2 lines of code (and it would generate 2 more lines automatically).
Each relation requires about 20 lines of code to express and they all look basically the same. I started trying to write a function to define them more generally but I haven't been able to do with with the amount of Types required. I'm half thinking to define a function that will write out the source code.
I totally understand starting with a more powerful and explicit syntax in the evolution of a product. Hoping there are some convenient shortcuts that I may have missed. Thank you
0 Replies