title: Hibernate BigDecimal Conversion Error for Different Numbers
body: <p>I have a test class which inserts into table successfully when I try with <code>BigDecimal fazlaBulundurmaOrani = new BigDecimal(6000);</code>. However, this test fails for different BigDecimal values such as <code>BigDecimal fazlaBulundurmaOrani = new BigDecimal(15000);</code></p>
  
  <p>Here is my test case:</p>
  
  <pre><code>@Test
  public void testGetDepoFazlaById() {
      DepoTur depoTur = new DepoTur("my tür", 5);
      depoTurService.saveDepoTur(depoTur);
  
      List&lt;DepoTur&gt; list = depoTurService.getDepoTurList();
      assertNotNull(list.get(0));
  
      BigDecimal fazlaBulundurmaOrani = new BigDecimal(6000);
      DepoFazla depoFazla = new DepoFazla(1, list.get(0), fazlaBulundurmaOrani);
      depoFazlaService.saveDepoFazla(depoFazla);
  }
  </code></pre>
  
  <p>Here is the hibernate reference in the model: </p>
  
  <pre><code>@Column(name = "FAZLABULUNDURMAORANI", nullable = false, columnDefinition = "DECIMAL(6, 2)")
  @Type(type = "big_decimal")
  private BigDecimal fazlaBulundurmaOrani;
  </code></pre>
  
  <p>Here is how I create database: </p>
  
  <pre><code>CREATE TABLE PGMTEMS.TDEPOFAZLA
  (
      ID DECIMAL(20,0) GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
      GRUP INTEGER NOT NULL,
      DEPOTUR DECIMAL(20, 0) NOT NULL,
      FAZLABULUNDURMAORANI DECIMAL(6, 2) NOT NULL,
      PRIMARY KEY (ID)
  )
  </code></pre>
  
  <p>I get this error when I try with different BigDecimal numbers:</p>
  
  <blockquote>
    <p>org.springframework.jdbc.UncategorizedSQLException: Hibernate
    operation: could not insert: [tr.gov.tcmb.pgmtems.model.DepoFazla];
    uncategorized SQLException for SQL [insert into PGMTEMS.TDEPOFAZLA
    (ID, DEPOTUR, FAZLABULUNDURMAORANI, GRUP) values (default, ?, ?, ?)];
    SQL state [null]; error code [-4220];</p>
  </blockquote>