Skip to content

Instantly share code, notes, and snippets.



Last active Mar 21, 2018
What would you like to do?
import javax.persistence.*;
import java.util.List;
@Table(name = "students")
public class Student implements Serializable {
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String name;
private String country;
private String email;
@Column(name = "created_at")
private String createdAt;
name = "student_courses",
joinColumns = {@JoinColumn(name = "student_id", referencedColumnName = "id")},
inverseJoinColumns = {@JoinColumn(name = "course_id", referencedColumnName = "id")}
private List<Course> courses;
//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
You can’t perform that action at this time.