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
Post a Comment