Sogar mit derselben Losung. Was mir auffallt: Mit doSelect scheint es dasselbe zu sein, un dich glaube fast, ich habe das irgendwo...
Grusse, Andreas Garzotto > -----Original Message----- > From: Eric Dobbs [mailto:[EMAIL PROTECTED]] > Sent: Donnerstag, 24. Januar 2002 05:47 > To: Turbine Users List > Subject: Re: Torque Criteria Question (doDelete and doSelect) > > > > On Wednesday, January 23, 2002, at 01:48 PM, Pete Kazmier wrote: > > > Quick question for any torque users out there (trying to finish up a > > Torque tutorial for the community), should BasePeer.doDelete(crit) with > > an empty Criteria object (crit = new Criteria()) delete everything or > > nothing in my table? > > Delete nothing in the table. > > It's a feature, not a bug. ;^) Even if it is inconsistent, I like > having to work a bit harder to intentionally delete everything in a > table. > > Here's why it works the way it does. Inside the doDelete method > > ... > Enumeration e = criteria.keys(); > while(e.hasMoreElements()) > { > //do stuff to assemble the SQL delete statement > ... > > A null criteria has no keys, so the sql statement doesn't get assembled. > The following criteria will probably do what you want: > > Criteria crit = new Criteria(); > crit.add(FooPeer.FOO_ID,0,Criteria.GREATER_THAN); > > > -Eric > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
