Joined: Fri Aug 17, 2007 8:36 am Posts: 3
|
I am Getting a LazyInitialization exception in getting a attribute which is mapped to a column and of type UserType [Currency].
Please look at the following code..
public abstract class Transaction{
private com.x.business.org.Currency defaultCurrency;
}
my hbm.xml file for Transaction :
the entry for the attribute ...is as follows ..
<property name="defaultCurrency" type="com.x.business.org.CurrencyEnum">
<column name="DEFAULTCURR" not-null="false" unique="false" sql-type="VARCHAR2(64)"/>
</property>
When i use a code lke transaction.getDefaultCurrency(); //
Here it throws ..LazyInitializationException ......
I tried to use ..FetchMode.Join for this ...it didnt work .../
any pointers to this problem..
CurrencyEnum is a user type for Currency.
Thanx in Advance ,
Kurt.
|
|