Hibernate version:3.1.3
Hi,
I have a tipical address mapping that among other fields has state and country.
State and Country are parametirezed types but here's the problem. The state lookup depends on the country so no mater what I try to do the owner object is not populated with the country.
So I have the following fields. How do I get my hands on the country while handling the statetype ?
Code:
<property name="countryType" column="country" not-null="true">
<type name="com.framework.core.utils.hibernate.GenericEnumUserType">
<param name="lookupClass">com.gsi.core.domain.enums.CountryType</param>
<param name="identifierMethod">getValue</param>
<param name="lookupMethod">lookup</param>
</type>
</property>
<property name="stateType" column="state" not-null="true">
<type name="com.framework.core.utils.hibernate.GenericEnumUserType">
<param name="lookupClass">com.gsi.core.domain.enums.StateType</param>
<param name="identifierMethod">getValue</param>
<param name="lookupMethod">lookup</param>
</type>
</property>
Thanks,
Q