ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vincent.sive...@staff.mcgill.ca
Subject Re: why delete by date not working?
Date Fri, 14 Jan 2005 11:52:27 GMT
Hi Philip,

An other error is that you dont define correctly your parameterClass. It should
be parameterClass="java.util.Date"

V.

Selon Philip Chan <pchan@locussystems.com>:

> Hi
>
> I have this delete statement
>
> java.util.Date now = new Date();
> SqlMapClient client = null;
> Reader reader = Resources.getResourceAsReader("SqlMapConfig.xml");
> client = SqlMapClientBuilder.buildSqlMapClient(reader);
>
> client.delete("ActivityLog.PurgeDate", now);
>
> Inside sqlmap.xml
> 	<delete id="ActivityLog.PurgeDate" parameterClass="date">
> 	<![CDATA[
> 	delete from activitylog al where where al.exectime <= #exectime#
> 	]]>
> 	</delete>
>
> The record never got deleted.
>
> I am using ibatis 2.0.x and oracle 9.
>



Mime
View raw message