title: Fetching Core Data entities, but not sub-entities
body: <p>Say I have entities organized in a hierarchy with <code>Parent</code> being the root entity and <code>Child</code> being a subclass of <code>Parent</code>.  I'd like to setup an <code>NSArrayController</code> to fetch only entities of <code>Parent</code>, but not <code>Child</code>.</p>
  
  <p>If you set the Entity Name of the array controller in Interface Builder to <code>Parent</code>, it fetches all <code>Parent</code> and <code>Child</code> entities.  I originally tried setting the array controller's fetch predicate in Interface Builder to:</p>
  
  <pre><code>entity.name == "Parent"
  </code></pre>
  
  <p>This worked for an XML store, but when I switched to a SQLite store, it no longer worked.  I get the following error:</p>
  
  <pre><code>keypath entity.name not found in entity &lt;NSSQLEntity xxx&gt;
  </code></pre>
  
  <p>As a work around, I am setting up a filter predicate (with the same <code>entity.name</code> predicate as above) in my <code>awakeFromNib</code> to filter only Parent entities.  Apparently, that predicate is valid once the entities are in memory, but you can't use it in a SQL-backed fetch predicate.</p>
  
  <p>Is there a way to fetch only <code>Parent</code> entities, but not <code>Child</code> entities using a fetch predicate that works with a SQLite store?  It seems wasteful to pull in entities that you're only going to ignore with the filter predicate.</p>