You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some special cases, more than one mentor may be assigned to a single section. This is currently disallowed by the database models, as the Section object has a one-to-one (or none) relationship between Mentor objects.
Changing this to a many-to-one relationship (through a foreign key on Mentor to Section) could allow for this feature. However, there are currently many assumptions in the view functions relying on the fact that any given section will only have one mentor. This means that a lot of this logic would need to be rewritten and checked to ensure that nothing breaks as a result of this change.
Changing the section.mentor to a section.mentor_set would also make fetching the course associated with the section a lot harder (since we'd need to fetch the mentor set and get an arbitrary mentor prior to getting the course field). This means that some additional consideration must be made regarding these relationships.
The text was updated successfully, but these errors were encountered:
In some special cases, more than one mentor may be assigned to a single section. This is currently disallowed by the database models, as the
Section
object has a one-to-one (or none) relationship betweenMentor
objects.Changing this to a many-to-one relationship (through a foreign key on
Mentor
toSection
) could allow for this feature. However, there are currently many assumptions in the view functions relying on the fact that any given section will only have one mentor. This means that a lot of this logic would need to be rewritten and checked to ensure that nothing breaks as a result of this change.Changing the
section.mentor
to asection.mentor_set
would also make fetching the course associated with the section a lot harder (since we'd need to fetch the mentor set and get an arbitrary mentor prior to getting the course field). This means that some additional consideration must be made regarding these relationships.The text was updated successfully, but these errors were encountered: