title: CoreData - Is there a good way to upsert items?
body: <p>Just wondering whether there is a good way to <strong>upsert</strong> items in a <code>CoreData db</code>?</p>
  
  <p>Or is there a way for me to consider a CoreData db as a set? </p>
  
  <p>I mean, if I insert an item into the db and if there is already an identical redundant item there, the db ignores it. Any way to conveniently do it? or I have to query each time when I insert in order to avoid redundancy?</p>