I have a CurrencyAmount object in my POJO that contains two properties (currency amount, currency type), each should be mapped to a different column in the database. If either of the two columns is null Ì'd like the whole object to be null, so I don't want to use a component, since it would instantiate the CurrencyAmount then call the setters with the null column(s).
Can I accomplish this with a UserType? Is there a way to map two columns with one UserType? Any other suggestions?
Thanks in advance
Paul
|