![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hibernate
clover灬
呵呵
展开
-
hibernate单向关联hbm.xml和annotation方式
1、many-to-one单向关联:a).hbm.xml配置如下:[code="xml"] [/code]annotation配置:[code="java"]@Entity()public class Flight implements Serializable { @ManyToOne( cas...2015-04-09 15:11:08 · 150 阅读 · 0 评论 -
hibernate双向关联hbm.xml和annotation方式
1、one-to-many/many-to-one双向关联hbm.xml配置方式:[code="xml"] [/code]inverse="true" 表示不在己方维护关系,但是如果not-null="true"已经设置了,这里就没有作用了。因为not-null="true"表示维护关系的一...2015-04-09 15:25:41 · 108 阅读 · 0 评论