We're trying to set up a fairly complicated schema...
# orm-help
b
We're trying to set up a fairly complicated schema and using MySQL and we don't want to use link tables for our relationships, ideally it would be an inline link. Does anyone know how to get this to work? We've tried using the @relation directive but it still seems to just spit out link tables...
s
I think Prisma only supports cross join table relations.
It’s either 3rd Normal form or BCNF. Can’t remember which.
b
Interesting, I feel this is a pretty big oversight as the DB looks a complete mess with all these join tables (and is surely a performance hinderance) but thanks for your reply anyway
s
It’s actually correct database architecture. It’s for data consistency and accuracy vs performance. Using direct defined relations between two tables can cause dangling rows.
m
Hey there 👋 , here is some useful information for you: 1. MySQL indeed supports only relation/link tables at the moment. 2. Postgres supports inline link if you configure the connector as
migrations: false
. But then you can’t use our Migration system unfortunately. sadparrot 3. We are aware that this sucks. This is why we are working on lifting this limitation right now. I am making good progress here. So stay tuned and soon things should be nice and shiny 🎉
🙌 3
b
Thank you @marcus That's very helpful! Good luck getting it all sorted and we eagerly anticipate the release 😊