nickheck February 2016
Dont work objectsWithPredicate with operator "NOT IN"?
I need to take to get items from the array that are not in the database.I'm trying to make this predicate
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"!(id IN %@)", ids];
But it returns nil, but if you use a predicate without NOT, then everything works. This is work in coredata - Predicate returns the objects are not in the database. But doesn`t work in realm.
Shehzad Ali February 2016
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"NOT (id IN %@)", ids];
NSArray *filtered = [ids filteredArrayUsingPredicate:predicate];
Asked in February 2016
Viewed 2,614 times
Answered 1 times
Leave an answer
Quote of the day: live life