ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Elfert <thorsten.elf...@db.com>
Subject Re: Oracle date type mapping issue
Date Thu, 08 Nov 2007 08:04:16 GMT
well, this does not work as well. I tried:

<result property="validFrom" column="VALID_FROM" jdbcType="TIMESTAMP"/>

and I tried:

<result property="validFrom" column="VALID_FROM" jdbcType="TIMESTAMP" 

the time gets truncated all the time.


Gwyn Evans <gwyn.evans@gmail.com> 
07.11.2007 17:34
Please respond to

Thorsten Elfert/OuB/Zentrale/DeuBa@dbcom
Re: Oracle date type mapping issue

Hi Thorsten,

On 07 November 2007, 3:58:47 PM, Thorsten Elfert wrote:



I use Oracle 9i, JDK 5 and the latest iBatis Release. Whenever I read a 
date object out of oracle and map it into a java.util.Date attribute the 
time gets truncated. I tried already to set explicitly the javaType as 
java.util.Date or java.sql.Timestamp and the jdbcType as DATE in the 
sql-map but it does not solve the problem. What is the correct way to map 
a java.util.Date to the Oracle Date Object ? (In the database the date and 
time gets stored correctly) 

Try using the jdbcType as TIMESTAMP as the SQL DATE type only contains a 
See "Dates and Times" here - 



Informationen (einschließlich Pflichtangaben) zu einzelnen, innerhalb der EU tätigen Gesellschaften
und Zweigniederlassungen des Konzerns Deutsche Bank finden Sie unter http://www.db.com/de/content/pflichtangaben.htm.
Diese E-Mail enthält vertrauliche und/ oder rechtlich geschützte Informationen. Wenn Sie
nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren
Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for information (including
mandatory corporate particulars) on selected Deutsche Bank branches and group companies registered
or incorporated in the European Union. This e-mail may contain confidential and/or privileged
information. If you are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure
or distribution of the material in this e-mail is strictly forbidden.
View raw message