You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Graeme J Sweeney <ib...@gjsweeney.com> on 2005/08/24 17:23:10 UTC
[REPOST] sqlMap + multiple deletes: getting the total number of rows
deleted
[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 -