![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hibernate高级映射
文章平均质量分 77
fhqiwcw
这个作者很懒,什么都没留下…
展开
-
OneToOne主键关联
首先来看表的关系: 表1: Husband husband_id<<pk>>name 表2 Wife wife_id <<pk>><<fk>>name Husband类 @Entitypublic class Husband { @Id @GeneratedValue private int id; p...原创 2011-04-08 10:36:59 · 114 阅读 · 0 评论 -
OneToMany 中间表关联
Class@Entitypublic class Class { @Id @GeneratedValue @Column(name = "class_id") private int id; private String className; @OneToMany(mappedBy = "myclass", cascade = CascadeType.ALL) ...原创 2011-04-08 11:28:57 · 997 阅读 · 0 评论