title: Fetching data using join-table in CoreData
body: <p>I have three tables with relations like on the picture below. 
  With the help of <strong>Mark Kryzhanouski</strong> (<a href="https://stackoverflow.com/questions/14973660/coredata-many-to-many-relationship/14975539#comment21036447_14975539">CoreData many-to-many relationship</a>) I know how to access to the set of all ingredients in some recipe:</p>
  
  <pre><code>NSMutableArray* ingredients = [recipe valueForKeyPath:@"ingredients.ingredient"];
  </code></pre>
  
  <p>But I would like to access to the list of ingredients by fetching. Because in the future I will prepare "to cart" function.</p>
  
  <p><img src="https://i.stack.imgur.com/V7ZtB.png" alt="Scheme"></p>
  
  <p>I did this in that way</p>
  
  <pre><code>NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ANY count.inRecipe == %@", self.recipe];
  </code></pre>
  
  <p>is it correct?</p>