I am a bit of a CoreData noob but am slowly getting my head around it. I am having trouble with the following code:
NSArray * artisteIds = [@"1,2,3,4" componentsSeparatedByString:@","];
predicate = [NSPredicate predicateWithFormat:@"(artisteId IN %@)", artisteIds];
My Artiste managed object has a NSNumber field of artisteId and I have looped through all Artistes in my object context and there are definately objects with id's 1-420.
But my helper method always returns a empty result set with that query
NSMutableArray* mutableFetchArtistes = [CoreDataHelper searchObjectsInContext:@"Artiste" :predicate :@"title" :YES :managedObjectContext];
Any suggestions?
To test it works I used the following and got a count of 3 results
predicate = [NSPredicate predicateWithFormat:@"(artisteId = 1) or (artisteId = 2) or (artisteId = 3)", artisteIds];