Hi All,
I'm sure this error msg is self-explanatory, but how do I fix it?
Thanks
Angus
org.hibernate.MappingException: Foreign key (FKE5A0BD21AC0BCC8B:Participation [id])) must have same number of columns as the referenced primary key (Participation [roleid,id])
Here's my mapping:
<class name="com.rose.ahr.hibernate.Role" table="Role">
<id name="id" type="int" column="id">
<generator class="native"/>
</id>
<set name="participations" table="Participation">
<key column="roleid"/>
<many-to-many column="id" class="com.rose.ahr.hibernate.Participation"/>
</set>
<property name="roledefnid" column="roledefnid"/>
<property name="classcode" column="classcode"/>
<property name="moodcode" column="moodcode"/>
<property name="code" column="code"/>
<property name="zrole" column="zrole"/>
<property name="playerentityid" column="playerentityid"/>
<property name="scoperentityid" column="scoperentityid"/>
<property name="effectivestarttime" column="effectivestarttime"/>
<property name="effectiveendtime" column="effectiveendtime"/>
<property name="msaccessid" column="msaccessid"/>
</class>
<class name="com.rose.ahr.hibernate.Participation" table="Participation" >
<id name="id" type="int" column="id">
<generator class="native"/>
</id>
<property name="moodcode" column="moodcode"/>
<property name="classcode" column="classcode"/>
<property name="typecode" column="typecode"/>
<property name="roleid" column="roleid"/>
<property name="actid" column="actid"/>
<property name="quantity" column="quantity"/>
<property name="zdescription" column="zdescription"/>
<property name="functioncode" column="functioncode"/>
<property name="participation" column="participation"/>
<property name="conceptid" column="conceptid"/>
<property name="msaccessid" column="msaccessid"/>
</class>
|