title: Core data find-or-create most efficient way
body: <p>I have around 10000 objects of entity '<code>Message</code>'. When I add a new '<code>Message</code>' 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. </p>
  
  <p>Right now the "find-or-create" algorithm works with by saving all of the Message objects '<code>objectID</code>' in one array and then filtering through them and getting the messages with <code>existingObjectWithID:error:</code></p>
  
  <p>This works fine but in my case when I fetch an 'Message' using <code>existingObjectWithID</code>: and then try to set and save a property by setting the property of the 'Message' object and calling save: on it's context it doesn't saves it properly. Has anyone come across a problem like this?</p>
  
  <p>Is there a more efficient way to make find-or-create algorithm?</p>