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" 
javaType="java.sql.Timestamp"/>

the time gets truncated all the time.

Thorsten
________________________________________



Gwyn Evans <[EMAIL PROTECTED]> 
07.11.2007 17:34
Please respond to
[email protected]


To
Thorsten Elfert/OuB/Zentrale/[EMAIL PROTECTED]
cc
[email protected]
Subject
Re: Oracle date type mapping issue






Hi Thorsten,

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

>

Hi, 

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 
date!
See "Dates and Times" here - 
http://www.oreilly.com/catalog/jentnut2/chapter/ch02.html.

-- 
/Gwyn


-- 

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.

Reply via email to