iOS: NSPredicate doesn't work correct
问题 I try to express the search parameters with predicate: NSPredicate *predicate=[NSPredicate predicateWithFormat:@"name CONTAINS [cd] %@ OR code CONTAINS [cd] %@ OR currency CONTAINS [cd] %@ AND continent.paid == %@",searchString,searchString,searchString,[NSNumber numberWithBool:YES]]; I try to express search parameters for possible string records ONLY where continent.paid==YES. The problem is that last expression is ignored. The search returns data from continent.paid==NO as well with the