Hi Tenwit,
Thanks for the reply. I think I'm a little dense here. I've read through the sections you suggested, I tried using the property-ref attribute in the key element within my Model mapping's many-to-many element. I then attempted a bi-directional mapping between my Model and Trim mappings like such:
Model:
Code:
<hibernate-mapping package="com.mitsubishi.mmsa.domain">
<class name="Model" table="mmsaBPModel">
<cache usage="read-write" region="standardCache"/>
<id name="modelId" column="ModelId" type="integer">
<generator class="native"/>
</id>
<set name="trims" table="mmsaBPTrim">
<cache usage="read-write" region="standardCache"/>
<key column="ModelId"/>
<many-to-many column="TrimId" class="Trim"/>
</set>
...
Trim:
Code:
<hibernate-mapping package="com.mitsubishi.mmsa.domain">
<class name="Trim" table="mmsaBPTrim">
<cache usage="read-write" region="standardCache"/>
<id name="trimId" column="TrimId" type="integer">
<generator class="native"/>
</id>
<set name="modelId" table="mmsaBPTrim" inverse="true">
<cache usage="read-write" region="standardCache"/>
<key column="TrimId"/>
<many-to-many column="ModelId" class="Model"/>
</set>
...
No luck with this either, in fact it gives me the same error message as what I had previously. I seem to be missing something. I took out references to the foreign-key tag, seeing as how that refers to something I'm not even trying to do. Any further suggestions on what I'm doing wrong would help greatly.
Cheers