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 "Brown, Melonie S. - Contractor" <Me...@forscom.army.mil> on 2003/07/03 16:27:41 UTC

Yet Another Update Question

I have an update where a particular field value needs to be changed for a
group of users.   I can retrieve the collection, iterate through and do
individual updates on each record, but that doesn't seem very efficient.

Is there a way to do a mass update or something like  "Update Some_Table Set
Field1 = 'foo' where Field1 = 'bar' ) without doing a custom query - perhaps
a broker.setCollectionByQuery() kind of thing?  

If so, could someone please provide a code snippet or point to an example?
[I'm using the PersistenceBroker]

I've reviewed the FAQ and PersistenceBroker documentation, but didn't see
anything that addressed this (If it's there and I overlooked it, a pointer
to the location would be great).

Melonie