ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "paul.wang" <paul.w...@mphasis.com>
Subject Insert problem whith wrong column sequence in SQL map
Date Wed, 08 Dec 2004 01:47:43 GMT
I have a table  with two date  fields,  and table schema, sql map like 
below:
My prolem is the insert clause using different ordering of table 
columns, then problem happens:
QUEUE_ITEM_MODIFY_DT_TIME DATE is 0/0/0000
QUEUE_ITEM_CREATE_DT_TIME DATE is 12/8/2004 09:19:57 and this is ok.

I am using iBatis 2.0.8, Oracle 9i. Is it a bug introducing by iBatis?

[Table schema]:
CREATE TABLE TEST_DATE ( ID VARCHAR2(20 BYTE), QUEUE_ITEM_MODIFY_DT_TIME 
DATE, QUEUE_ITEM_CREATE_DT_TIME DATE )

[SQL mapping]:
<insert id="insertDate"  parameterClass="testDate">  insert into 
TEST_DATE (  id, QUEUE_ITEM_CREATE_DT_TIME,
QUEUE_ITEM_MODIFY_DT_TIME)  values (  oracle_SEQ.nextval,  
#createOn,javaType=java.util.Date,jdbcType=TIMESTAMP#,  
#modifyOn,javaType=java.util.Date,jdbcType=TIMESTAMP#  )  </insert>

Regards,
Paul

Mime
View raw message