I’ve got a problem in the formulation of my query; this is the scenario:

based on this db schema, I know the naming part sucks a little, but this is
a project which has been already kicked off, so I’ve to stick with that.
Now, my goal is to select all the characters with a determined pack_id and a certain category_id, i.e. all the characters from pack 1 in category 5, so this’s my NSPredicate
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(category_id == %@) AND (charRelationship.pack_id == %@)", [[cat valueForKey:@"category_id"] stringValue], curPack];
[request setEntity:[NSEntityDescription entityForName:@"Category" inManagedObjectContext:self.managedObjectContext]];
[request setPredicate:predicate];
NSError *error;
NSArray *result = [self.managedObjectContext executeFetchRequest:request error:&error];
as soon as the compiler tries to execute the fetchRequest, it crashes and goes SIGABRT.
I really hate the fact that xcode is not even giving me a clue about the exception so that I could figure it out myself. So after blindly trying to fix it with no success, I wonder if there’s anybody out there who could help me.
I’ve already red a ton of other threads on SO and elsewhere, but I couldn’t find any solution.
thanks a lot
-k-
try using ANY for the relationship: