title: org.hibernate.PropertyAccessException - How to get a null value out of database?
body: <p>Here is the exception:</p>
  
  <p><em>org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.FOO.hibernate.Tccl.MIN.</em></p>
  
  <p>I found that this exception happen when i try to get the null value from MIN column. There're some solutions for this issue:</p>
  
  <ul>
  <li>Set "NULL" (a string) for MIN column</li>
  <li>Set default value, like 0 or 0.0.</li>
  </ul>
  
  <p>But MIN column has the INT type and 0 or 0.0 is such a value in my case. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>        String HQL_QUERY = "from Tccl tccl";
          Query query = session.createQuery(HQL_QUERY);
          List&lt;Tccl&gt; list = query.list();
          for(Tccl tccl : list){
                 //fetch data here
          }
  </code></pre>
  
  <p>The exception happen at:</p>
  
  <pre><code> List&lt;Tccl&gt; list = query.list();
  </code></pre>
  
  <p>Are there any solutions for this?</p>