title: iBATIS - Defining 'javaType' and 'jdbcType'
body: <p>While defining the <code>resultMap</code> in iBatis, it provides an option to set the <code>javaType</code> and <code>jdbcType</code> for each property to column mapping.</p>
  
  <p>e.g. </p>
  
  <pre><code>&lt;resultMap id="employee" class="com.mycompany.Employee"&gt;
     &lt;result property="firstName" column="first_name" javaType="?" jdbcType="?"/&gt;
  &lt;/resultMap&gt;
  </code></pre>
  
  <p><strong>Wanted to know that when we should be defining the <code>javaType</code> and <code>jdbcType</code>?</strong> I have seen mapping where it <em>just</em> works without defining these properties and in others we have to define them.</p>
  
  <p><strong>EDIT:</strong> See the selected answer below for the above question.</p>
  
  <p><strong>Also, do we have an exhaustive list out of which <code>javaType</code> and <code>jdbcType</code> should be defined?</strong></p>
  
  <p><strong>EDIT:</strong> <code>javaType</code> should be one of the well-known types e.g. <code>java.lang.String</code>, <code>java.util.Date</code>
  and <code>jdbcType</code> should be coming out of <a href="http://download.oracle.com/javase/6/docs/api/java/sql/Types.html" rel="noreferrer">java.sql.Types</a></p>
  
  <p>Thanks in advance!</p>