Hibernate version: 3.1.3
Database: MySQL 5.0
So far I have only created simple tables with an Id autoincrementing primary key.
I have an existing table for which I urgently need to generate a mapping with the last two fields being the primary key as follows:
-- Table structure for advertiser
-- ----------------------------
CREATE TABLE `advertiser` (
`advertiserMasterId` int(11) default NULL,
`advertiserId` int(11) NOT NULL,
`networkId` int(11) NOT NULL,
PRIMARY KEY (`advertiserId`,`networkId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
How should the hibernate mapping file be defined to match this structure, please?
Regards.
Mark
|