[
https://issues.apache.org/jira/browse/TORQUE-112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587713#action_12587713
]
Carl Manaster commented on TORQUE-112:
--------------------------------------
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.
> Delete via Join deletes all records in the table
> ------------------------------------------------
>
> Key: TORQUE-112
> URL: https://issues.apache.org/jira/browse/TORQUE-112
> Project: Torque
> Issue Type: Bug
> Components: Runtime
> Affects Versions: 3.3
> Environment: mysql, at least, though I suspect this bug is not
> database-specific.
> Reporter: Carl Manaster
> Attachments: JoinedDeleteTest.java
>
> Original Estimate: 72h
> Remaining Estimate: 72h
>
> When I delete using a criteria that contains a join, instead of only the
> records of interest being deleted, all records are deleted.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]