首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

Hibernate annotation 联结主键

2012-10-06 
Hibernate annotation 联合主键Hibernate annotation 联合主键????然后用junit4调试:create table Husband

Hibernate annotation 联合主键

Hibernate annotation 联合主键

?

?

?

?

然后用junit4调试:

    create table Husband (        id integer not null auto_increment,        name varchar(255),        wife_id integer,        wife_name varchar(255),        primary key (id)    )    create table Wife (        id integer not null,        name varchar(255) not null,        primary key (id, name)    )    alter table Husband         add index FKAEEA401B2DB1BA15 (wife_id, wife_name),         add constraint FKAEEA401B2DB1BA15         foreign key (wife_id, wife_name)         references Wife (id, name)
?

?

热点排行