Reputation: 3401
Let's say I have two CloudKit record types:
Company
Employee
In my app if I have an array Companies, is there a way to query CloudKit for all Employees whose company is in this array with a single query? Obviously I could go through the companies
array and query one by one, but if this array is large then that's going to be a lot slower.
The docs say that you can reference an array in a CKQuery predicate, but doesn't say how.
Upvotes: 0
Views: 378
Reputation: 21
Yes you can use the predicate
NSPredicate(“%k IN %@“, company, arrayofcompaniesReference)
Upvotes: 2