How do I create an NSPredicate for a subquery given an existing NSPredicate?
<p>In my app, one Audit has many Findings.</p>

<p>I have a method which returns an NSPredicate which filters findings by search text and type ID:</p>

<pre><code>+ (NSPredicate)predicateWithSearchText:(NSString *)searchText typeId:(NSNumber *)typeId;
</code></pre>

<p>I want to use this predicate to filter an array of Audits according to the properties of their findings.  So, given the output of the first method, I want to create a new predicate equivalent to:</p>

<pre><code>[NSPredicate predicateWithFormat:@"SUBQUERY(findings, $x, ????).@count &gt; 0"]
</code></pre>

<p>...where <code>????</code> applies my existing predicate to the audit's findings.</p>

<p>How can I do this without exposing the logic inside <code>+predicateWithSearchText:typeId:</code>?</p>