You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Eric Northam <Er...@i4commerce.com> on 2003/06/13 01:11:26 UTC
Deleting Large Quantities
I was wondering if this is the appropriate way to delete a large number of
objects with ODMG:
(taken from OQLOrOnForeignKeyTest)
OQLQuery query = odmg.newOQLQuery();
query.create("select person from " + PersonImpl.class.getName());
List persons = (List) query.execute();
Iterator it = persons.iterator();
while (it.hasNext())
{
db.deletePersistent(it.next());
}
tx.commit();
Won't this load each object completely into memory?
Eric
DISCLAIMER: The information contained in this e-mail is, unless otherwise
indicated, confidential and is intended solely for the use of the named
addressee. Access, copying or re-use of the e-mail or any information
contained therein by any other person is not authorized. If you are not the
intended recipient please notify us immediately by returning the e-mail to
the originator.
Re: Deleting Large Quantities
Posted by Mauricio CASTRO <mc...@hotmail.com>.
Hi all,
Does OJB supports update/delete objects via Object Query Language?
Mauricio Castro.
----- Original Message -----
From: "Eric Northam" <Er...@i4commerce.com>
Subject: Deleting Large Quantities
> I was wondering if this is the appropriate way to delete a large number of
> objects with ODMG:
>
> (taken from OQLOrOnForeignKeyTest)
>
> OQLQuery query = odmg.newOQLQuery();
> query.create("select person from " + PersonImpl.class.getName());
> List persons = (List) query.execute();
> Iterator it = persons.iterator();
> while (it.hasNext())
> {
> db.deletePersistent(it.next());
> }
> tx.commit();
>
> Won't this load each object completely into memory?
>
> Eric