Hi.
The basic idea is for type handlers, refer to the following file.
And try to review the following.
1. DoubleTypeHandler Class Declare anotation.
-----------------------------------------------------------------------------------------
@MappedTypes(?) <--- missing java data type.
@MappedJdbcTypes(JdbcType.DOUBLE)
public class DoubleTypeHandler extends BaseTypeHandler<Double> {
...
}
-----------------------------------------------------------------------------------------
ex)
@MappedTypes(value=String.class)
@MappedJdbcTypes(value={jdbcType.CLOB})
-----------------------------------------------------------------------------------------
2. TestRowMapper.xml XML File
-----------------------------------------------------------------------------------------
<resultMap id="BaseResultMap" type="com.extrategic.dashboard.db.row.TestRow">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Feb 18 21:34:20 PST 2014.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="double_data" jdbcType="DOUBLE" property="doubleData" /> <--- Declare TypyeHandler
<result column="date_data" jdbcType="DATE" property="dateData" />
<result column="date_time_data" jdbcType="TIMESTAMP" property="dateTimeData" />
</resultMap>
-----------------------------------------------------------------------------------------
ex)
<result column="double_data" jdbcType="DOUBLE" property="doubleData" typeHandler="" />
typeHandler="???" <--- Custom TypeHandler full package path or TypeAlias name
-----------------------------------------------------------------------------------------
I hope you have good results.
Bye.
==================================
IkChan SIM
Software Architeture.
H.P : 010 - 8242 - 2727
Nothing in the world can take the place of persistence.
==================================