问一个Many to Many的设计问题# Java - 爪哇娇娃
A*o
1 楼
一个简单的例子:
student - course - scores.
student has courses;
course has students;
and each student has a score on each course.
so, students and course are many to many.
now that scores make the many to many relationship into another entity.
and the question is, in hibernate or ejb3 world,
how do i map them? so that i can find which courses a student in
and which students in courses, and what scores are like.
should i have students with scores;
and course with scores;
and also students with courses (
student - course - scores.
student has courses;
course has students;
and each student has a score on each course.
so, students and course are many to many.
now that scores make the many to many relationship into another entity.
and the question is, in hibernate or ejb3 world,
how do i map them? so that i can find which courses a student in
and which students in courses, and what scores are like.
should i have students with scores;
and course with scores;
and also students with courses (