cappuccino/cappuccino — Issue #1464: Allow multiple rules to be join with AND operator while CPNotPredicateType is selected in CPCompoundPredicate class
Author: lynnchin
Created: 2012-02-24 03:39:08+00:00
State: open

From the CPCompoundPredicate.j file, it only returns the first index found in the rule list while CPNotPredicateType is selected predicateFormat method.

line 173: case CPNotPredicateType: result += "NOT " + [args objectAtIndex:0];

It should be changed into the following:

result += "NOT " + [args objectAtIndex:0];
var count = [args count];
for (var j = 1; j < count; j++)
result += " AND " + [args objectAtIndex:j];

So that multiple rules can be joined up together with an AND operation before returning the predicateFormat string as a whole.