Core Data fetch request with array

Posted by JK on Stack Overflow See other posts from Stack Overflow or by JK
Published on 2010-04-15T17:29:24Z Indexed on 2010/04/15 17:33 UTC
Read the original article Hit count: 247

I am trying to set a fetch request with a predicate to obtain records in the store whose identifiers attribute match an array of identifiers specified in the predicate e.g.

NSString *predicateString = [NSString stringWithFormat:@"identifier IN %@", employeeIDsArray];

The employeeIDsArray contains a number of NSNumber objects that match IDs in the store. However, I get an error "Unable to parse the format string". This type of predicate works if it is used for filtering an array, but as mentioned, fails for a core data fetch. How should I set the predicate please?

© Stack Overflow or respective owner

Related posts about coredata

Related posts about cocoa