title: Core Data unsupported predicate with ALL and IN
body: <p>I have a request like this :</p>
  
  <pre><code>NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ANY attributes.attribute.attributeId IN %@", attributeIds];
  </code></pre>
  
  <p>That will return a list of objects, that have one ore more of the attributes I set. I want to get a list of objects that have all the attributes I pass, so I tried :</p>
  
  <pre><code>NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ALL attributes.attribute.attributeId IN %@", attributeIds];
  </code></pre>
  
  <p>But I got an exception :</p>
  
  <pre><code>'NSInvalidArgumentException', reason: 'Unsupported predicate (null)'
  </code></pre>
  
  <p>Anyway, I'm not even sure that this is the right request. Say that I have at list of attributes : <code>[red, green, blue]</code>, <strike>How can I get all objects that have at least those attributes ?</strike></p>
  
  <pre><code>* Object_1 (red, green, blue)
  * Object_2 (red, green, blue, yellow, brown)
  * Object_3 (red, green blue, black, brown)
  </code></pre>
  
  <p>but not <code>Object_4 (red, green, yellow)</code> because it doesn't have the <code>blue</code> attribute (note that I get all 4 objects with my <code>ANY</code> fetch request, as expected)</p>
  
  <p><strike>edit, related question : what if I want a full match ? So for <code>[red, green, blue]</code> I will only get <code>Object_1</code> ?</strike></p>
  
  <hr>
  
  <p>edit 2 : I managed to answer both questions, but <a href="https://stackoverflow.com/questions/11374667/core-data-match-a-to-many-relationship-to-a-list">I have a new one</a></p>