Skip to main content

JDBC/JPA

  3 posts   Feedicon  
Replies: 2 - Last Post: April 13, 2015 11:05
by: otaviojava
showing 1 - 3 of 3
Posted: August 20, 2013 00:00 by mmcgovern_oz
Hi

What is the situation regarding persistence?

Ideally we'd have JDBC types.

Thanks

Michael
Posted: September 03, 2013 22:22 by Anatole
Hello Michael

thanks for your question. Basically you are completely right, but there are some things to consider:
* for Money and MoneyCurrency (the impl classes) this will not be an option, since it would require to depend on JPA, which is not possible, when added to the JDK in version 9.
* Also for CurrencyUmit, you may take a simple String representation, it is far more complex and implementation dependent for a monetary amount, or you must map it to a data structure using arbitrary precision, which will not be what you want in most use cases (since it will be slow).

So I guess, that the basic RI will not support it. Nevertheless it is worth to discuss, if we can provide something as part of the RI, perhaps in combination with ISO 20023 amounts...

Regards,
Anatole
Posted: April 13, 2015 11:05 by otaviojava
Talking about persistence.
We can create the convert type using JPA 2.1 like this:

http://java.dzone.com/articles/mapping-enums-done-right
Replies: 2 - Last Post: April 13, 2015 11:05
by: otaviojava
 
 
Close
loading
Please Confirm
Close