You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Thomas Fox (JIRA)" <ji...@apache.org> on 2011/06/23 15:06:47 UTC

[jira] [Resolved] (TORQUE-112) Delete via Join deletes all records in the table

     [ https://issues.apache.org/jira/browse/TORQUE-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Fox resolved TORQUE-112.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0

The join will now be added correctly into the SQL query, but because of TORQUE-9 the delete will use a DELETE FROM... instead of a SELECT FROM ... and joins in deletes will produce errors in most databases.
So in most (if not all) databases an error will be thrown if the above is attempted. To delete via a join in the future, first the entries should be selected and then deleted manually.

> 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
>            Assignee: Thomas Fox
>             Fix For: 4.0
>
>         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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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