Hibernate Team |
 |
Joined: Tue Aug 26, 2003 3:00 pm Posts: 1816 Location: Austin, TX
|
Maybe I'm missing something here, but it seems like your missing the point of a UserType. The UserType implementation acts as this buffer between the actual type you want mapped in hibernate.
Basically, you'd have a MonetaryAmount class (the existing class) and MonetaryAmountUserType (or whatever you want to call it. Then you'd map the MonetaryAmount in the hibernate mapping using type="MonetaryAmountUserType". This exists this way exactly for the purpose you mention: avoiding dependencies on hibernate in your business classes.
|
|