title: Is it possible to store BigDecimal 0.000 in Oracle with JPA
body: <p>I have the following property on a JPA entity:</p>
  
  <pre><code>@NotNull
  @DecimalMin("0.000")
  @DecimalMax("1.000")
  @Digits(integer = 1, fraction = 3)
  @Column(nullable = false, precision = 4, scale = 3)
  private BigDecimal confidence;
  
  public BigDecimal getConfidence() {
      return this.confidence;
  }
  
  public void setConfidence(BigDecimal confidence) {
      this.confidence = confidence;
  }
  </code></pre>
  
  <p>If confidence is set to "0.000", eg: setConfidence(new BigDecimal("0.000")); and then the entity is persisted to the database and then fetched back from the database, the value fetched loses its precision and scale and is simply 0. </p>
  
  <p>The database schema is created by JPA/Eclipselink when the web application is deployed. </p>
  
  <p>My environment is EclipseLink 2.3.2.v20111125-r10461, Oracle 11g R2, Oracle JDBC thin driver OJDBC 1.6.</p>