title: Using NSPredicate to filter on both Core attribute and entity
body: <p>I have two entities in core data (call them entityOne and entityTwo). I have a entityOne&lt;--->>entityTwo relationship between them.</p>
  
  <p>I am now trying to code an NSPredicate to fetch entityTwo objects on the following basis:</p>
  
  <ol>
  <li><p>Fetch entityTwo objects that have a relationship with a specified entityOne object.</p></li>
  <li><p>Filter out those entityTwo objects which have no value for one of their attributes.</p></li>
  </ol>
  
  <p>I am best doing both of these in an NSPredicate or is there a better way?</p>
  
  <p>I am trying the following:</p>
  
  <pre><code>NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(attribute &lt;&gt; "") AND (relationship == entityOne"];
      [request setPredicate:predicate];
  </code></pre>
  
  <p>Any pointers on coding great fully received.</p>