I am trying to implement the CompositeUserType containing a many-to-one association, however I am unable to find any documentation on how to map this in my hbm files. Does anyone know how to do this? Here is an example:
Code:
<hibernate-mapping>
<class name="Plan" table="PLAN">
<id name="id" type="long" unsaved-value="-1">
<generator class="sequence">
<param name="sequence">PLAN_SEQ</param>
</generator>
</id>
<property name="configid" column="CONFIGID" type="long"/>
<property name="src" column="SRC" type="java.lang.String"/>
<property name="dest" column="DEST" type="java.lang.String"/>
</class>
</hibernate-mapping>
<hibernate-mapping>
<class name="Config" table="CONFIG">
<id name="id" type="long" unsaved-value="-1">
<generator class="sequence">
<param name="sequence">CONFIG_SEQ</param>
</generator>
</id>
<property name="country" column="COUNTRY" type="java.lang.String"/>
<property name="lang" column="LANG" type="java.lang.String"/>
</class>
</hibernate-mapping>
I would like to implement a CompositeUserType in class Plan that contains a many-to-one association with the Config class.