Core data find-or-create most efficient way
问题 I have around 10000 objects of entity ' Message '. When I add a new ' Message ' i want to first see whether it exists - and if it does just update it's data, but if it doesn't to create it. Right now the "find-or-create" algorithm works with by saving all of the Message objects ' objectID ' in one array and then filtering through them and getting the messages with existingObjectWithID:error: This works fine but in my case when I fetch an 'Message' using existingObjectWithID : and then try to