Answer the question
In order to leave comments, you need to log in
How to correctly establish a relationship between a user group and a database model?
I have two user groups Students and teachers, I created a Group model, and there should be a 1xM connection between the group and students, but how to do this with a group of students. I have this idea:
Create a separate model, inherit from User and add a group there, etc.
When registering, drop it into Students and immediately into the role of a student, when changing the role to a teacher, delete it from students
How much it has the right to life, and maybe there are options it is better?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question