NSPredicate to filter out results by property that exists only in one of the subclasses
<p>Is it possible to write a predicate that would filter out objects by property that exists only in one of the subclasses (in CoreData).</p>

<p>For example:</p>

<pre><code>class MainClass: NSManagedObject {
    vars...
}

class Subclass1: MainClass {
    vars...
}

class Subclass2: MainClass {
    var isImportant: NSNumber
}
</code></pre>

<p>I would like to write a predicate that would return <code>MainClass</code> type objects but would filter out <code>Subclass2</code> objects whose property <code>isImportant</code> is set to <code>false</code>.</p>

<p>So resulting array of objects should include all <code>MainClass</code> and <code>Subclass1</code> objects. But only <code>Subclass2</code> objects whose <code>isImportant</code> property is set to <code>true</code>.</p>

<p>I need to write similar predicate for fetch request for <code>NSFetchedResultsController</code> in CoreData. </p>