title: Hibernate Data Exception not coming
body: <p>I have a POJO class as follows,</p>
  
  <pre><code>Public class RateUp{
  int id;
  String rate;
  }
  </code></pre>
  
  <p>and in hbm file,</p>
  
  <pre><code>&lt;property name="rate" column="RATE" type="string" length="4"/&gt;
  </code></pre>
  
  <p>In database,the data type of rate column is <strong>character</strong> and length is <strong>4</strong></p>
  
  <p>and when i save the data as follows,</p>
  
  <pre><code>Rateup obj = new Rteup();
  obj.setRate("444444");
  session.saveorupdate(obj);
  </code></pre>
  
  <p>there is no exception even the length of the string is longer than defined.</p>
  
  <p>when <code>transaction.commit</code> happens it is throwing <strong>DATAEXCEPTION</strong> but i want hibernate to throw the exception when <code>saveorupdate</code> happens </p>
  
  <p>Thanks</p>