hibernate正向生成資料庫表以及配置——Student.java
阿新 • • 發佈:2019-01-03
package cn.bdqn.studentInfo.entity; import java.util.HashSet; import java.util.Set; /** * 學生表的實體類 * @author Administrator * */ public class Student { private Integer id; private String name; private Set<Teacher>teachers=new HashSet<Teacher>(); public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Set<Teacher> getTeachers() { return teachers; } public void setTeachers(Set<Teacher> teachers) { this.teachers = teachers; } public Student(Integer id, String name, Set<Teacher> teachers) { super(); this.id = id; this.name = name; this.teachers = teachers; } public Student() { super(); } }