ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burke.Kevin" <Kevin.Bu...@cic.gc.ca>
Subject DELETE statement deletes all rows in table
Date Wed, 11 Feb 2009 16:24:38 GMT
Hi,

We have encountered a bizarre scenario while using iBatis 2.3.0.667 on
Sybase ASE.  We began experiencing our entire table being wiped from a
delete statement that uses dynamic SQL to build the FROM and WHERE
clauses in a sqlmap.  We were pretty sure valid parameters were being
passed in to the sqlmap via a parameterMap,  and after logging the
output of the SQL we verified the statement looked correct. It ran
correctly through a sql client connected directly to ASE. However,
through iBatis it ignored the WHERE clause and deleted all rows.  Turns
out, our table name was preceded with "dbo.".  This was causing iBatis
to ignore our WHERE clause and issue just a "delete <tablename>" against
our db. Yikes!  We were using a <delete> tag in our sqlMap file, and
invoking delete() from our dao via Spring's SqlMapClientDaoSupport
class.

Has anyone else experienced this?  Is this a possible bug in this
version of iBatis? I have searched the archives and Googled, but I
cannot find any similar experiences.

Cheers,

Kevin



Mime
View raw message