You map the m2n table as a normal class. use instead of <id>:
Code:
<composite-id class="PersonEventPK">
<key-many-to-one name="person" class="Person" column="fkPerson"/>
<key-many-to-one name="event" class="Event" column="fkEvent"/>
</composite-id>
alternatively, you can use, instead of <key-many-to-one/> the <key-property/>, which will hold a java value instead of a mapping class.
You also have to create the PK class (here PersonEventPK).
See here:
http://www.hibernate.org/hib_docs/v3/re ... ompositeid
If that helped, please rate this answer.
Cheers,
Ron