ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graeme J Sweeney <ibatis.u...@gjsweeney.com>
Subject [REPOST] sqlMap + multiple deletes: getting the total number of rows deleted
Date Wed, 24 Aug 2005 15:23:10 GMT
[Looks like my first post got lost when the list went down :-/]

Hi,

I'm a newbie to iBatis and as part of some unit-testing I need to confirm 
that the correct number of rows are deleted when removing some records.

If do

<delete id="deleteXY">
delete from X where id=#value#;
delete from Y where id=#value#;
</delete>

I get the number of rows deleted from Y only.

If I split the delete into two separate entries:

<delete id="deleteX">
delete from X where id=#value#;
</delete>

<delete id="deleteY">
delete from Y where id=#value#;
</delete>

and call them both, I get the expected number of rows deleted when I add them.

Is there a way to have only one call to <delete/> and get the total 
number of rows deleted ?

TIA.

-- 
Graeme -

Mime
View raw message