You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Fabian Moerchen <fa...@mybytes.de> on 2002/01/23 18:11:44 UTC
Re: Torque Criteria Question (doDelete and doSelect)
hi
i was at the same point last night. ;)
i expected the same behaviour you did, since DELETE FROM MYTABLE
deletes everything. i didn't even see deleteAll() yet, so thanks for
enlightening me, but i agree, it's not coherent with doSelect.
bye
fabian
On Wed, 2002-01-23 at 21:48, 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?
>
> I saw the BasePeer.deleteAll() convience method, but was wondering why
> doDelete() didn't emulate doSelect() when passed an empty Criteria
> object. I was expecting it to delete everything, just as doSelect()
> would have selected everything.
>
> Thanks,
> Pete
>
> --
> Peter Kazmier http://www.kazmier.com
> PGP Fingerprint 4FE7 8DA3 D0B5 9CAA 69DC 7243 1855 BC2E 4B43 5654
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Torque Criteria Question (doDelete and doSelect)
Posted by Fabian Moerchen <fa...@mybytes.de>.
hi
actually that was too quick. for me neither
MyTablePeer.doDelete(new Criteria())
nor
BasePeer.deleteAll(MyTablePeer.TABLE_NAME, null, 0)
works. how do i delete all entries?
i need it for my unit tests, so i know i start with an empty table.
bye
fabian
On Wed, 2002-01-23 at 18:11, Fabian Moerchen wrote:
> hi
>
> i was at the same point last night. ;)
>
> i expected the same behaviour you did, since DELETE FROM MYTABLE
> deletes everything. i didn't even see deleteAll() yet, so thanks for
> enlightening me, but i agree, it's not coherent with doSelect.
>
> bye
> fabian
>
> On Wed, 2002-01-23 at 21:48, 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?
> >
> > I saw the BasePeer.deleteAll() convience method, but was wondering why
> > doDelete() didn't emulate doSelect() when passed an empty Criteria
> > object. I was expecting it to delete everything, just as doSelect()
> > would have selected everything.
> >
> > Thanks,
> > Pete
> >
> > --
> > Peter Kazmier http://www.kazmier.com
> > PGP Fingerprint 4FE7 8DA3 D0B5 9CAA 69DC 7243 1855 BC2E 4B43 5654
> >
> > --
> > To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> >
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>