Reputation: 1527
NSArray * relationships = [entity.relationshipsByName allKeys];
Will return ALL relationships.
What about if I only want relationships that's one to Many? That is relationship that support selector count.
How would I do so?
Upvotes: 0
Views: 55
Reputation: 2689
If you loop through the NSDictionary
returned by entity.relationshipsByName
, each value is an NSRelationshipDescription
instance which has the property isToMany
. You could pull out only the relationships where that property is true?
Upvotes: 1