标签:style blog color strong 数据 div 问题 代码 sp
@ManyToMany(fetch = FetchType.LAZY, mappedBy = "students") public Set<Teacher> getTeachers() { return teachers; }
Set<Student> students;
@ManyToMany(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) @JoinTable(name = "Teacher_Student", joinColumns = {@JoinColumn(name = "Teacher_ID", referencedColumnName = "teacherid")}, inverseJoinColumns = {@JoinColumn(name = "Student_ID", referencedColumnName ="studentid")}) public Set<Student> getStudents() { return students; }
@ManyToMany(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) @JoinTable(name = "Teacher_Student", joinColumns = {@JoinColumn(name = "Student_ID", referencedColumnName = "studentid")}, inverseJoinColumns = {@JoinColumn(name = "Teacher_ID", referencedColumnName ="teacherid")}) public Set<Teacher> getTeachers() { return teachers; }
@ManyToMany(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) @JoinTable(name = "Teacher_Student", joinColumns = {@JoinColumn(name = "Teacher_ID", referencedColumnName = "teacherid")}, inverseJoinColumns = {@JoinColumn(name = "Student_ID", referencedColumnName ="studentid")}) public Set<Student> getStudents() { return students; }
标签:style blog color strong 数据 div 问题 代码 sp
原文地址:http://www.cnblogs.com/ranger2016/p/3953053.html