db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Stenerud <k...@webartjapan.com>
Subject Re: Delete not working with empty criteria
Date Thu, 03 Apr 2003 00:40:18 GMT
Thanks for the help.

After thinking about it a bit more, I've decided that I don't have the belly 
for keeping code around that deletes an entire table, even if it is only for 
testing purposes =)


2003 4月 3 木曜日 00:47、Eric Emminger さんは書きました:
> Karl
>
> > I'm trying to delete all entries in a table, but when I run the program,
> > nothing happens.
> >
> >
> > I built the delete statement the same way I did a select all statement:
> >
> >     Criteria crit = new Criteria();
> >     AdminuserPeer.doDelete(crit);
> >
> > After running this, the table still has old data in it.  Is there
> > something else I should be doing?
>
> I'm guessing this is a safeguard against accidentally deleting everything.
>
> Try adding something to your Criteria, such as
>
> crit.add(YourPeer.YOUR_PRIMARYKEY, 0, Criteria.GREATER_THAN);
>
> Eric
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message