I am facing difficulty to write hibernate mapping with java annotation for problem as given below.
Problem:
Tables
Table:Courses_Teachers columns: id course_id teacher_id year(academic year)
Table: Courses_Students columns: id course_id student_id year(academic year)
Table: Courses_Teachers_Students course_teacher_id course_student_id
Classes
class Student {
Map<Course,List<Teacher>> courseTeachersMap;
}
Requirements
- A course can be taught by multiple teachers to same student group .
- A course is assigned to a grade level.
- A grade level can have multiple student groups who are assigned different set of teachers for a course.
Please suggest me how to specify annotation for courseTeachersMap property in class student.