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

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -