Created
March 21, 2018 05:11
-
-
Save chathurangat/9e1227f685298bc6d231801fde1bc545 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.persistence.*; | |
import java.io.Serializable; | |
@Entity | |
@Table(name = "student_courses") | |
@IdClass(StudentCourseId.class) | |
public class StudentCourseEnrollment implements Serializable | |
{ | |
@Id | |
@ManyToOne | |
@JoinColumn(name = "course_id", referencedColumnName = "id") | |
private Course course; | |
@Id | |
@ManyToOne | |
@JoinColumn(name = "student_id", referencedColumnName = "id") | |
private Student student; | |
@JoinColumn(name = "from_date") | |
private String fromDate; | |
@JoinColumn(name = "to_date") | |
private String toDate; | |
//TODO add getters and setters for all properties | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment