Hi,
Given a mapping like:
Code:
class Foo {
int fooId;
Set values;
}
class ContactInfo {
TelNo telNo;
Address address;
}
class TelNo {
String countryCode;
String areaCode;
String localNo;
}
<hibernate-mapping>
<class name="Foo">
<set name="values" table="Value">
<key column="fooId"/>
<composite-element class="ContactInfo">
<nested-composite-element name="telNo" class="TelNo">
<property name="countryCode"/>
<property name="areaCode"/>
<property name="localNo"/>
</nested-composite-element>
</composite-element>
</set>
</class>
</hibernate-mapping>
I don't understand why we have to specify the class="TelNo" in the <nested-composite-element>. After all, it can find out the class of the "telNo" property of the ContactInfo class.
TIA for any info!