Let's say I load in 1,000 objects via Core Data, and each of them has a user-settable Favorite
boolean. It defaults to NO
for all objects, but the user can paw through at will, setting it to YES
for as many as they like. I want a button in my Settings page to reset that Favorite
status to NO
for every single object.
What's the best way to do that? Can I iterate through every instance of that Entity somehow, to set it back? (Incidentally, is 'instance' the right word to refer to objects of a certain entity?) Is there a better approach here? I don't want to reload the data from its initial source, since other things in there may have changed: it's not a total reset, just a 'Mass Unfavourite' option.