联合主键:就是表中2个或者2个以上的字段做为这个表的主键,通常多对多的关系表中使用联合主键
在hibernate中,联合主键必须重写equals(),hashcode()方法
eg:create table aa (a int,b int,c char(2),d datetime);
alter table aa add primary key (a,b);
在hibernate中,联合主键必须重写equals(),hashcode()方法
eg:create table aa (a int,b int,c char(2),d datetime);
alter table aa add primary key (a,b);