db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manaster, Carl" <Ca...@ACTIVX.com>
Subject RE: Joined Delete
Date Thu, 10 Apr 2008 17:07:00 GMT
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.


To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message