Using ManyToMany
with a dedicated Model
#4149
Replies: 1 comment
-
Bump 😢 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I've been reading the docs and it states that I don't have to create a Model for my pivot table.
So If I have extra metadata (like the proficiency column in the example), the way to go is the following
In my case, I want to have a Model. I call my pivot table
memberships
, so I'll assign a lot of stuff that shouldn't be part of theUser
model. So whitelisting many columns in theOrg
model feels a bit awkward to me.This could be wrong, but I'm trying to follow this article (Teams should be an MVP feature!) closely for now.
So, would the following models, work the same way?
Again, is there any concern about doing it this way instead of utilizing the
manyToMany
decorator? So far, it looks good. I'm not sure if I'm missing/breaking something by not following the conventions thought.🙇🏻
Resources:
Beta Was this translation helpful? Give feedback.
All reactions