I have these two class(table)
@Entity
@Table(name = \"course\")
public class Course {
@Id
@Column(name = \"courseid\")
private String courseId;
The student_course table is there purely to record the association between the two entities. It is managed by hibernate, and can contain no other data.
The sort of data you want to record needs to be modelled as another entity. Perhaps you could a one-to-many association between Course and StudentResult (which contains the grade, etc), and then a many-to-one association between StdentResult and Student.