I want to save an amount in the database using JPA.
@Column(precision=8, scale=2)
private BigDecimal amount;
But after persisting, the decimal values are always 0. E.g., when I create the amount with
amount = BigDecimal.valueOf(30.20D);
and store it to the database with em.persist(..), the value in the database is 30,00. When I use a sql update command, I can set it to any value, no problem.
This seems very strange. I use EclipseLink and Sybase DB.