KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Setup: I have a Core Data object A that has a to-many relation to B. Call the relation "items". So, a.items returns all B-s associated with A. Now, I have a manually composed NSSet "itemSet" of B objects. I want to do the following: return all A objects whose "items" relation exactly matches itemSet How do I construct a predicate for that? I’ve tried this: NSPredicate *predicate = [NSPredicate predicateWithFormat: @"(ALL items in %@)", itemSet]; But that just gives me Unsupported predicate (null) . This: NSPredicate *predicate = [NSPredicate predicateWithFormat: @"(items in %@)", itemSet]; tells me unimplemented SQL generation for predicate . Interesting, but not helpful. So what’s the right way to filter the relation with a set?
Tags (comma-separated)
Save Edits
Cancel