Alternatively just use:
        TableNamePeer.executeStatement("delete from <TableName>");

-----Original Message-----
From: Campbell, Justin [mailto:[EMAIL PROTECTED]
Sent: 04 June 2003 19:39
To: 'Turbine Torque Users List'
Subject: RE: deleteAll / delete entire table content


Very simple solution to this one. Call the following code:

crit.add(TableNamePeer.PK_COLUMN, null, Criteria.ISNOTNULL)

In this example, PK_COLUMN is whatever column you're using as a primary key.
Obviously, this is because we can ensure a PK will not be null. If you have
another column you'd like to use, feel free.

-----Original Message-----
From: Auinger, Thomas [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 4:49 AM
To: 'Turbine Torque Users List'
Subject: deleteAll / delete entire table content


Probably a rather simple question, but I couldn't find an 
answer in the archive:

I thought I could implement a doDeleteAll method by simply 
writing:

    public class ItemPeer {

        public static void doDeleteAll() throws TorqueException
        {
          Criteria crit = new Criteria();
          doDelete(crit);
        }

        ...
    }

But doesn't work, since there is no 'tables' item in the 
resulting Criteria object (that's what I found out debugging).

Any ideas? Thanks!

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to