title: How to map a composite key with JPA and Hibernate?
body: <p>In this code, how to generate a Java class for the composite key (how to composite key in hibernate):</p>
  
  <pre><code>create table Time (
       levelStation int(15) not null,
       src varchar(100) not null,
       dst varchar(100) not null,
       distance int(15) not null,
       price int(15) not null,
       confPathID int(15) not null,
       constraint ConfPath_fk foreign key(confPathID) references ConfPath(confPathID),
       primary key (levelStation, confPathID)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  </code></pre>