db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject Re: delete and joins problem
Date Sun, 15 Apr 2007 16:09:38 GMT
Thomas Fischer wrote:
> - deprecate the methods BasePeer.doDelete(Criteria) and
> BasePeer.doDelete(Criteria, Connection)
> - add new methods BasePeer.doDelete(Criteria, String tablename) and
> BasePeer.doDelete(Criteria, String tablename, Connection)
> - Modify the templates to use the new methods from the generated Peers.
> 
> This would also have the additional advantage that XXXPeer.doDelete(new
> Criteria()) would be working (i.e deleting all rows from the XXX
> table).
> 
The new methods would provide a good opportunity to prepare a fix for
TORQUE-13 (doDelete should return the number of record deleted). So
please keep in mind to return an int (long?) from BasePeer.doDelete().

I'm actually not sure if this fix will solve the problem on the long
run, although I have to admit that I don't understand what you're
planning in detail. I cold be wrong, but I guess deleting must be
re-implemented anyway so that joins work as expected (e.g. to allow
something like - in MySQL syntax:

DELETE tblA FROM tblA LEFT JOIN tblB ON tblA.ID = tblB.ID WHERE tblB.ID
IS NULL.

For the time being, I'd rather document the behavior, and leave it as it is.

Bye, Thomas.

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


Mime
View raw message