when I use enums it just saves the instance name i.e. USD not 
TradeCurrency.USD I believe it stores the enum.getName() call.




> From googling and a quick scan of the mailing list archives, it looks as if 
> I can't map java.util.Currency directly to a database column using pure JPA.
> 
> Unless anyone can tell me I'm wrong, I'm thinking of doing it with my own 
> enum of the currencies that my app uses and map it with
> 
> <enumerated>
> 
> Then the question becomes: what would be more future-compatible - ORDINAL 
> or STRING?
> 
> I assume STRING because java.util.Currency has no ordinal, but if I use 
> STRING, won't JPA save the String TradedCurrency.USD or TradedCurrency.EUR 
> instead of just USD or EUR?
> 
> 
> Thanks
> Adam
> 

-- 
                                                           Ted Leung
                                                           [EMAIL PROTECTED]

Being normal is vastly over rated.

Reply via email to