hankandre
DTDrizzle Team
•Created by miigaarino on 7/4/2023 in #help
Many to many - Planetscale
I'm not the OP, so I can't close this, but I'm golden now. Thanks for all the help everyone! Sorry I didn't look at the highlights in the docs hard enough.
42 replies
DTDrizzle Team
•Created by miigaarino on 7/4/2023 in #help
Many to many - Planetscale
Thank you so much, @Angelelz !
42 replies
DTDrizzle Team
•Created by miigaarino on 7/4/2023 in #help
Many to many - Planetscale
Oh my gosh. I knew it was something idiotic and I just overlooked it in the docs. 🤦♂️
42 replies
DTDrizzle Team
•Created by miigaarino on 7/4/2023 in #help
Many to many - Planetscale
Gotcha! I see where I went wrong. The relation on each is to the join table.
42 replies
DTDrizzle Team
•Created by miigaarino on 7/4/2023 in #help
Many to many - Planetscale
When I remove that, like it says you can do in the docs, I'm uncertain how I can write my query. Doing this results in an error (using tRPC) when attempting to launch Drizzle Studio:
42 replies
DTDrizzle Team
•Created by miigaarino on 7/4/2023 in #help
Many to many - Planetscale
Presumably that's because of the
references(() => books.id)
and references(() => authors.id)
usage.42 replies
DTDrizzle Team
•Created by miigaarino on 7/4/2023 in #help
Many to many - Planetscale
When I attempt to push that schema I get this message from PlanetScale:
42 replies
DTDrizzle Team
•Created by miigaarino on 7/4/2023 in #help
Many to many - Planetscale
Here's an example from a schema I wrote out that has a many-to-many relationship of books and authors:
42 replies
DTDrizzle Team
•Created by miigaarino on 7/4/2023 in #help
Many to many - Planetscale
I have a junction table and the relations setup, like the example, but in the junction table,
usersToGroups
, is referencing foreign keys. I can give my specific example in a couple hours. I’m AFK right now.42 replies
DTDrizzle Team
•Created by miigaarino on 7/4/2023 in #help
Many to many - Planetscale
I think I could actually use help here. I'd rather avoid doing things manually via a bunch of table joins, if I can avoid it.
42 replies