学习hibernate的笔迹第三篇,主要内容:多对多关系, 检索策略,HQL查询,QBC,事物管理,c3p0配置

 

1.1.1  Hibernate的关联关系映射:(多对多)

1.1.1.1     多对多的配置:

步骤一创建实体和映射:

 1 Student:
 2 
 3 public class Student {
 4 
 5 private Integer sid;
 6 
 7 private String sname;
 8 
 9 // 学生选择多门课程.
10 
11 private Set<Course> courses = new HashSet<Course>();
12 
13 ...
14 
15 }
Student

相关文章:

  • 2022-01-19
  • 2021-12-26
  • 2021-05-19
  • 2022-01-01
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
猜你喜欢
  • 2021-07-10
  • 2021-11-15
  • 2021-11-19
  • 2022-02-18
相关资源
相似解决方案