drizzle many-to-many
https://gist.github.com/barrybtw/f4c54bf7bdac98af34069363d7b1be87
Trying to setup a many-to-many relationship between calendar and user. But I'm getting some weird Typescript errors.
Solution:Jump to solution
oh wait im a dumb dumb i was using the relation definition instead of the table for the many relation input
2 Replies
Lemm walk through it, might make sense
We've got a user storing all this, which has a one to many relationship with both the session table and calendar table like this
calendar_to_user_relations
is a junction/join table
Session is irrelevant to the error so let's skip to the calendar
table
And it's one to many relationship with the junction table
The junction table looks like this
The errors are on both one-to-many relations between both user and calendar to the junction tableSolution
oh wait im a dumb dumb i was using the relation definition instead of the table for the many relation input