title: BigDecimal precision not persisted with JPA annotations
body: <p>I am using the javax.persistence API and Hibernate to create annotations and persist entities and their attributes in an Oracle 11g Express database.</p>
  
  <p>I have the following attribute in an entity:</p>
  
  <pre><code>@Column(precision = 12, scale = 9)
  private BigDecimal weightedScore;
  </code></pre>
  
  <p>The goal is to persist a decimal value with a maximum of 12 digits and a maximum of 9 of those digits to the right of the decimal place.</p>
  
  <p>After calculating <code>weightedScore</code>, the result is 0.1234, but once I commit the entity with the Oracle database, the value displays as 0.12.  </p>
  
  <p>I can see this by either using an EntityManager object to query the entry or by viewing it directly in the Oracle Application Express (Apex) interface in a web browser.</p>
  
  <p>How should I annotate my BigDecimal attribute so that the precision is persisted correctly?</p>
  
  <p>Note: We use an in-memory HSQL database to run our unit tests, and it does not experience the issue with the lack of precision, with or without the <code>@Column</code> annotation.</p>
  
  <p>Update:</p>
  
  <p>Looking at the table description, the definition of the <code>weightedScore</code> column is <code>NUMBER(19, 2)</code>.  I have now also tried changing the annotation to <code>@Column(columnDefinition="Number(12, 9)")</code>, but this has had no effect.  Does anyone know why Oracle is unresponsive to these annotations?</p>