tags:

views:

442

answers:

0

Hi,

I have a subclassed NSManagedObject (ObjectA) which has a relationship one-to-may to another subclassed NSManagedObject (ObjectB). I get the ObjectB NSSet from ObjectA's generated method.

I want to determine if an ObjectB with a given 'name' exists in the returned NSSet (e.g. ObjectB.name == "xxx").

What is the most efficient way to determine the NSSet contains the object instead of iterating/comparing my way through the whole NSSet?

Cheers