docs icon indicating copy to clipboard operation
docs copied to clipboard

Improve confusing 'Relation tables' section of many-to-many docs

Open keerlu opened this issue 2 years ago • 0 comments

This section in our m:n relation docs is weird:

  • It seems to be a general description of relation/join tables and how they make m:n relations work ("one m-n relation is modeled as two 1-n relations in the database")
  • but at the same time also only apply to "explicit m:n" which was explained in an earlier section - as the "implicit m:n" is of course NOT two 1:n in the Prisma schema as the relation table is invisible/implicit.

It also uses the same Post->CategoriesOnPosts<-Category example exactly how it is used in the "explicit m:n" section. This should probably be cleaned up. M:n relations is complicated enough as a topic by itself, and that makes it a lot more confusing.

(Maybe most of the "Relation tables" content can be moved to "Explicit m:n")

https://prisma-company.slack.com/archives/C5Z9TH6N9/p1659726372938069

keerlu avatar Aug 11 '22 08:08 keerlu