Friday 15 February 2013

ios - NSPredicate with SUBQUERY does not work -


I have to sort my fetch request with the people I choose, but it does not return anything < P> I tried this code with comparison of Coredata objects

  NSPredicate * peoplePredicate = [NSPredicate predicateWithFormat: @ "SUBQUERY (Class People, $ P, $ P IN% @). @ Count ==% d ", self Selected people, [self Counting selected people]];   

and compare it with NSNumber ID

  NSPredicate * peoplePredicate = [NSPredicate predicateWithFormat: @ "SUBQUERY (Class People, $ p, $ p.iD IN% @). @ Calculation ==% D ", self Selected local, [self. Selected mathematics]];   

I have an entity class, which are people of relation and I have a control controller where I can select some people in the list, after people's selection people add to it . People are selectors, so I need to get all the objects of a class unit, who have chosen people

thanks in advance

So, your Wiki should look like this:

  NSPredicate * PeoplePredicate = [NSPredicate predicateWithFormat: @" People of any category% @ ", themselves Selected people];    

No comments:

Post a Comment