New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicit many to many relationships with/without extra columns #816
Comments
There's also a related discussion here: prisma/specs#264 |
model Blog {
id Int @id
authors Writer[]
}
model Writer {
id Int @id
blogs Blog[]
}
// many to many
model BlogsWriters {
id Int @id
blog Blog
author Writer
is_owner Boolean
} also suggested migration steps: |
@ifndefdeadmau5 This won't actually work as of right now. The following schema has been tested and works :) model Blog {
id Int @id
authors BlogWriter[]
}
model Writer {
id Int @id
blogs BlogWriter[]
}
// many to many
model BlogWriter {
id Int @id
blog Blog
author Writer
is_owner Boolean
} |
what is the status of prisma supporting extra data fields with M-N relation? |
This is now implemented 🚀 |
Tracks implementation of https://github.com/prisma/specs/tree/master/schema#explicit-many-to-many-mn-relationships-with-or-without-extra-columns
Many-to-many relation with/without extra columns.
The text was updated successfully, but these errors were encountered: