db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Emminger <e...@ericemminger.com>
Subject Re: Delete not working with empty criteria
Date Wed, 02 Apr 2003 15:47:53 GMT
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


Mime
View raw message