@Entity public class Course { @Id private int courseNo; @ManyToMany private List<Student> studentList; } @Entity public class Student { @Id private int StudentNo; @ManyToMany(mappedBy="studentList") private List<Course> CourseList; }
public class Course {
@Id
private int courseNo;
@ManyToMany
private List<Student> studentList;
}
@Entity
public class Student {
private int StudentNo;
@ManyToMany(mappedBy="studentList")
private List<Course> CourseList;
Java Persistence API
Access: Public Instant Grading
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use.