Re: EOEditingContext help
Re: EOEditingContext help
- Subject: Re: EOEditingContext help
- From: David Avendasora <email@hidden>
- Date: Sun, 19 Sep 2010 07:01:02 -0400
Hi Ted,
Can you define "whole bunch" are we talking thousands, millions? I follow the mantra of "First make it work, then worry about optimizing it if it is to slow."
If you are updating the same attribute on all the objects, you can simply use key-value coding.
myArray.takeValueForKey(newValue, Entity.ATTRIBUTE_KEY);
Also, how are you saving? Are you saving each object, or saving the EditingContext?
Dave
On Sep 18, 2010, at 11:38 PM, Theodore Petrosky wrote:
> I have to update a whole bunch of objects. Method 1 says make a list of the objects, make the changes and saveChanges(). Seems really inefficient. If there were only 50 objects I would probably do that. So I created a procedure on backend. Basically, an update of all records that match a job number.
>
> Of course this is making a change behind the back of my WO App. and someone may be looking at this data.
>
> So what are my choices? go back to method 1. Looping through 500 records, then saving changes? Or is there a way to selectively invalidate these objects to force any other users to get fresh data?
>
> Ted
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden