For those interested, I answered my own question after going through the source code. It seems that BasePeer.doDelete(Criteria) does not inspect the Criteria object for any Criterion that have been and()/or()'d, thus effectively ignoring those Criterion.
I plan on submitting patches to document this inconsistency between doSelect() and doDetele() methods after I finish the tutorial I am writing. On Thu, Jan 24, 2002 at 06:07:14AM -0500, Pete Kazmier wrote: > A followup question, how do you do the following in Torque: > > DELETE FROM table WHERE id=5 OR id=23 > > I tried (from an exmample using Criteria in the Peers HOWTO, although > that was for a doSelect()): > > Criteria crit = new Criteria(); > Criteria.Criterion c1 = > crit.getNewCriterion(BookPeer.ISBN, "123", Criteria.EQUAL); > Criteria.Criterion c2 = > crit.getNewCriterion(BookPeer.ISBN, "456", Criteria.EQUAL); > crit.add(c1.or(c2)); > BookPeer.doDelete(crit); > > Did I do something incorrect? The doDelete() only deleted one row, not > both. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
