I am on hibernate 2.1.7, and am not familar with the return-property. Here is how I have my composite-id tables setup.
<?xml version="1.0"?>
Code:
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="com.iws.model.eci.search.Patient" table="PATIENT">
<composite-id>
<key-property name="punbr" column="PUNBR" type="string" />
<key-property name="grnbr" column="GRNBR" type="string"/>
<key-property name="essn" column="ESSN" type="string"/>
<key-property name="seq" column="SEQ" type="string"/>
</composite-id>
<property name="lname"
column="LNAME"
update="false"
insert="false"
type="string"/>
<property name="ftname"
column="FTNAME"
update="false"
insert="false"
type="string"/>
<property name="addr1"
column="ADDR1"
update="false"
insert="false"
type="string"/>
<property name="city"
column="CITY"
update="false"
insert="false"
type="string"/>
<property name="state"
column="STATE"
update="false"
insert="false"
type="string"/>
<property name="zip"
column="ZIP"
update="false"
insert="false"
type="string"/>
</class>
</hibernate-mapping>
Maybe you could give it a shot and see if it works in 3. You may want to change the DTD to point to the correct one for version 3.
Paul