While defining the resultMap in iBatis, it provides an option to set the javaType and jdbcType for each property to column mapping.
e.g.
<resultMap id="employee" class="com.mycompany.Employee">
<result property="firstName" column="first_name" javaType="?" jdbcType="?"/>
</resultMap>
Wanted to know that when we should be defining the javaType and jdbcType? I have seen mapping where it just works without defining these properties and in others we have to define them.
EDIT: See the selected answer below for the above question.
Also, do we have an exhaustive list out of which javaType and jdbcType should be defined?
EDIT: javaType should be one of the well-known types e.g. java.lang.String, java.util.Date
and jdbcType should be coming out of java.sql.Types
Thanks in advance!
For
jdbcTypethe documentation (for iBATIS 3) states:On page 33 in this document is a list of supported JDBC types.
For the
javaTypeattribute it says: