title: Core Data predicate : unimplemented SQL generation for predicate
body: <p>Basically I got 3 entities in my data model : Brand, Model and Trim.</p>
  
  <ul>
  <li>A brand has a one-to-many relationship with Model called "models". (one brand have multiple models but a model has only one brand)</li>
  <li>A model has a many-to-many relationship with Trim called "trims". (a model can have multiple trims, and a trim can have multiple models)</li>
  </ul>
  
  <p>Having an array of trims objects, I would like to get all the brands having a model which "contains" at least one trim contained inside this array.</p>
  
  <p>So here is my predicate for the fetch request :</p>
  
  <pre><code>NSFetchRequest *request = [[NSFetchRequest alloc] initWithEntityName:@"Brand"];    
  [NSPredicate predicateWithFormat:@"ANY models.trims IN %@", arrayOfTrims];
  </code></pre>
  
  <p>And here is the error I'm getting : </p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'unimplemented SQL generation for predicate : (ANY models.trims IN {&lt;Trim: 0x8e60340&gt; (entity: Trim; id: 0x8e62f10 &lt;x-coredata://BCD28560-AED5-4409-9A35-1925001773E6/Trim/p8&gt;
  </code></pre>
  
  <p>I'm kinda new to Core Data and I have no idea what I'm doing wrong.</p>
  
  <p>Hope someone can help,</p>
  
  <p>Thanks a lot.</p>