objective c - Dont work objectsWithPredicate with operator "NOT IN"? -


i need take items array not in database.i'm trying make predicate

nspredicate *predicate = [nspredicate predicatewithformat:@"!(id in %@)", ids];  return[productmodel objectswithpredicate:predicate]; 

but returns nil, if use predicate without not, works. work in coredata - predicate returns objects not in database. doesn`t work in realm.

try

nspredicate *predicate = [nspredicate predicatewithformat:@"not (id in %@)", ids];  nsarray *filtered  = [ids filteredarrayusingpredicate:predicate]; 

Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -