Hibernate annotations to map one to one unidirectional association with composite primary key
问题 I have two tables : report and flyleaf. A report is identified by an 'id' and an 'index' which are foreign and primary keys in flyleaf table. The schema of the tables are : CREATE TABLE `report` ( `id` int(11) NOT NULL, `index` varchar(5) NOT NULL, `nb_page` int(11) DEFAULT NULL ); ALTER TABLE `report` ADD PRIMARY KEY (`id`,`index`); CREATE TABLE `flyleaf_t` ( `id` int(11) NOT NULL, `index` varchar(5) NOT NULL, `title` varchar(30) DEFAULT NULL, `author` varchar(30) DEFAULT NULL, `checker`