Composite key on n:m relation table #1999
Answered
by
janpio
ff-anthony-soto
asked this question in
Q&A
-
I need to simulate an n:m table (
What's the way to do a composite key between tables? |
Beta Was this translation helpful? Give feedback.
Answered by
janpio
Mar 29, 2020
Replies: 1 comment 1 reply
-
Should both |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ff-anthony-soto
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should both
muscle
andexercise
inMuscleExercis
both be unique individually (which is how it is modeled right now) or as a compound unique? If the latter, you should try@@unique([muscle, execrise])
- that should be treated as the unique identifier for that model.