title: Filter Nsarray of coredata objects which have not same value for two differnt attributes
body: <p>I have core data with properties named <code>productId</code> &amp; <code>usedProductId</code> i want to get all data in which both have different values </p>
  
  <p>I used following predicate </p>
  
  <pre><code>[NSPredicate predicateWithFormat:@"productId != usedProductId"] 
  </code></pre>
  
  <p>its work fine if both have some values but its not returning those results in which <code>usedProductId = nil</code> &amp; productId has some value. </p>
  
  <p>To overcome this i used <code>[NSPredicate predicateWithFormat:@"productId != usedProductId" OR (usedProductId == NIL AND productId.length &gt; 0)]</code> but its not efficient solution i guess it should possible without OR condition.</p>
  
  <p>I am not good explainer so please feel free to ask for any more explanations of questions. :)</p>