Hi, Thomas,

> - Unfortunately, select and delete sql is composed 
> differently. Have you tried to debug the sql code which is 
> used for the delete ?

I've now had a chance to debug with the torque source, and here is my
best explanation of what is going on.  There doesn't appear to be any
sql code in play.  Instead, all records are being deleted because inside
BasePeer.processTables(), whereClause is empty (resulting in a selection
of all records).  There are two opportunities to put something into
whereClause, in the columnMaps loop.  Both are passed up because
crit.containsKey(key) fails with both "t2.t2_id" and "t2.t1_id".  I
believe that the only key in crit is "t1.t1_id", which is never examined
by this code, because it studies only the columns of the table of
interest, which is of course t2.

I don't understand enough of torque's big picture to suggest how to fix
this, but maybe this explanation will help.

Peace,
--Carl

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to