摘要: 1 学生课程、分数的设计(重要)@Entitypublic class Student { private int id; private String name; private Set courses = new HashSet(); @ManyToMany ... 阅读全文
posted @ 2014-12-05 15:06 enjoy_clh 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 1 树状结构的设计(至关重要)a) 在同—个类中使用One2Many和Many20ne@Entitypublic class Org { private int id; private String name; private Set children=new HashSet();... 阅读全文
posted @ 2014-12-05 13:35 enjoy_clh 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 集合映射(不太重要)1 Set2 List (与Set差不多 多个@OrderBy) a) @OrderBy 排序private List users = new ArrayList(); @OneToMany(mappedBy="group", casca... 阅读全文
posted @ 2014-12-05 11:17 enjoy_clh 阅读(134) 评论(0) 推荐(0) 编辑