Thank you Ron!

>From the FAQ:
Q: I don't like OQL, can I use the PersistenceBroker Queries within ODMG?
A:

Yes you can! The ODMG implementation relies on PB Queries internally!
Several users (including myself) are doing this.

If you have a look at the execute() method in
org.apache.ojb.odmg.oql.OqlQueryImpl you will see how OJB Query objects can
be used withing ODMG transactions. The most important thing is to lock all
objects returned by a query to the current transaction.


"Until they become conscious they will never rebel, and until after they
have rebelled they cannot become conscious"
--Orwell 1984
----- Original Message ----- 
From: "Ron Gallagher" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, June 12, 2003 7:57 PM
Subject: Re: Deleting Large Quantities


> Maruicio/Eric -- 
>
> I know that the PersistenceBroker provides the deleteByQuery(Query) method
to do exactly what you're talking about.  However, I'm not sure how you'd go
about working with the PB and ODMG apis within the same transaction.
>
> Ron Gallagher
> Atlanta, GA
> [EMAIL PROTECTED]
>
> >
> > From: "Mauricio CASTRO" <[EMAIL PROTECTED]>
> > Date: 2003/06/12 Thu PM 08:03:49 EDT
> > To: "OJB Users List" <[EMAIL PROTECTED]>
> > Subject: Re: Deleting Large Quantities
> >
> > Hi all,
> >
> > Does OJB supports update/delete objects via Object Query Language?
> >
> > Mauricio Castro.
> >
> > ----- Original Message ----- 
> > From: "Eric Northam" <[EMAIL PROTECTED]>
> > 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
> >
> > ---------------------------------------------------------------------
> > 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]
>
>

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

Reply via email to