title: How can you reference child entity name in a predicate for a fetch request of the parent entity?
body: <p>I have the need to create a complex predicate for an abstract base object.  I want to have separate predicate queries for different inheriting entities and key off the sub-entity type, the example below is what I would like to do, however, I have not been able to find a way to reference the entity name or type in the predicate.</p>
  
  <pre><code>NSFetchRequest *request = [[NSFetchRequest alloc] init];
  request.entity = [NSEntityDescription entityForName:@"MyCommonObjectBase" inManagedObjectContext:myContext];
  
  NSPredicate *subclassAPredicate = [NSPredicate predicateWithFormat:@"someValue &gt; %@ &amp;&amp; entityName = %@", 100, @"SubclassA"];
  NSPredicate *subclassBPredicate = [NSPredicate predicateWithFormat:@"someValue &lt; %@ &amp;&amp; entityName = %@", 50, @"SubclassB"];
  
  request.predicate = [NSCompoundPredicate orPredicateWithSubpredicates:[NSArray arrayWithObjects:subclassAPredicate, subclassBPredicate, nil]];
  </code></pre>