Hi there!

Have you tried with FK and cascade delete ?

Which means one delete statement, but "behind" the scene, deletes in several 
tables,
the number of deleted rows should then be correct ?

Erlend

-------

[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 -

Reply via email to