title: JPA save BigDecimal as integer in Database
body: <p>I have this field in the database:</p>
  
  <pre><code>ITEMCOST    NUMERIC (13)    DEFAULT 0  NOT NULL
  </code></pre>
  
  <p>In JAVA, the field in the Entity is defined like this:</p>
  
  <pre><code>@Column(name = "ITEMCOST")
  private BigDecimal itemCost;
  </code></pre>
  
  <p>The values are stored in the database as integer. Where the last two digits are the decimal values. like this: </p>
  
  <ul>
  <li>DB <strong>100</strong> means 1.00</li>
  <li>DB <strong>250</strong>  means 2.50</li>
  <li>etc</li>
  </ul>
  
  <p>What I want is when I read the Entity the value is loaded like that. 
  If the value in the database is 357 the BigDeciamal should have the value  "3.57". And when I save that entity, the value should be converted again as INT.</p>