Unless I am really tired, the above should generate (I use hibernate to create tables) a table 'event_owners' with a index column 'idx', 'Event_id' and 'User_id'.The constraints should be unique on (event_id,user_id) and (event_id,user_id,idx) with user_id also being a primary key. What I get is the following:

As you can see it generates - UNIQUE KEY `eventOwners_id` (`eventOwners_id`), - which makes this effectively a onetoone mapping.Do you see anything wrong or is it a bug?Thanks.-----I am using 3.6.0.Final and MySQL 5.1.6.Note this is a Unidirectional mapping