摘要: hibernate annotation多对多中间表添加其他字段的第三种方法 阅读全文
posted @ 2017-05-18 14:16 MJBrian 阅读(1713) 评论(0) 推荐(0) 编辑
摘要: 一、一对多(@OneToMany) 1、单向一对多模型 假设通过一个客户实体可以获得多个地址信息。 对于一对多的实体关系而言,表结构有两种设计策略,分别是外键关联和表关联。 (1) 映射策略---外键关联 在数据库中表customer和表结构address定义,如下: create table customer ( id int(20) not null auto_increment, ... 阅读全文
posted @ 2017-05-18 14:14 MJBrian 阅读(551) 评论(0) 推荐(0) 编辑