Archive for June 25th, 2010
Using Ibatis Typehandlers to fix Oracle Date “missing time”
Friday, June 25th, 2010
The Problem
When using Ibatis to retrieve Date type values, on Oracle 10g (some driver versions), the time portion of the value returned from the database is not mapped onto the Java object.
i.e.
In DB: 02-JAN-10 13:30:00
In Java Object after mapping: 02-JAN-10 00:00:00
The Ibatis ResultMapper, snippet, looks like this:
.... <result property="savedDate" column="SAVED_DATE" javaType="java.util.Date" jdbcType="DATE"/> ....
Tags: ibatis, java, oracle
Posted in Examples | 2 Comments »
