title: NSPredicate compare numbers issue
body: <p>I have this function that supposed fetch from CoreData with Predicate:</p>
  
  <pre><code>- (NSArray*)fetchingManagedObjectsWithEntityName:(NSString*)entityName predicate:(NSString*)predicateFormat
  {
      NSManagedObjectContext *moc = [[MainDb sharedDb] managedObjectContext];
      NSEntityDescription *entityDescription = [NSEntityDescription entityForName:entityName inManagedObjectContext:moc];
      NSFetchRequest *request = [[NSFetchRequest alloc] init];
      [request setEntity:entityDescription];
  
      NSPredicate *predicate = [NSPredicate predicateWithFormat:predicateFormat];
      [request setPredicate:predicate];
  
      NSError *error;
      NSArray *array = [moc executeFetchRequest:request error:&amp;error];
      if (array.count == 0)
      {
          return @[];
      }
      return array;
  }
  </code></pre>
  
  <p>But for some reason it's not working fine, this is how I call it:</p>
  
  <pre><code>NSArray *objects = [[DownloadData sharedData] fetchingManagedObjectsWithEntityName:@"DbSomething" predicate:[NSString stringWithFormat:@"somethingId == %d", someId.intValue]];
  </code></pre>
  
  <p>I've tried these predicates as well:</p>
  
  <pre><code>[NSString stringWithFormat:@"somethingId == '%d'", someId.intValue]
  [NSString stringWithFormat:@"somethingId == %ld", someId.integerValue]
  [NSString stringWithFormat:@"somethingId == '%ld'", someId.integerValue]
  [NSString stringWithFormat:@"somethingId == %@", someId]
  [NSString stringWithFormat:@"somethingId == '%@'", someId]
  </code></pre>
  
  <p>The 'somethingId' that is in the CoreData DbSomething object is an NSNumber.</p>
  
  <p>I always get a list of all the 'DbSomething' objects that looks like this, the last one is always with data, all the others are 'fault':</p>
  
  <pre><code>&lt;_PFArray 0x1700368c0&gt;(
  &lt;DbSomething: 0x1702db890&gt; (entity: DbSomething; id: 0xd0000000005c0012 &lt;x-coredata://FD3BA7EB-B2D7-4133-B209-A94C58949C2F/DbHomeDish/p23&gt; ; data: &lt;fault&gt;),
  &lt;DbSomething: 0x1702db9e0&gt; (entity: DbSomething; id: 0xd000000000c00012 &lt;x-coredata://FD3BA7EB-B2D7-4133-B209-A94C58949C2F/DbHomeDish/p48&gt; ; data: &lt;fault&gt;),
  &lt;DbSomething: 0x1702db900&gt; (entity: DbSomething; id: 0xd000000001280012 &lt;x-coredata://FD3BA7EB-B2D7-4133-B209-A94C58949C2F/DbHomeDish/p74&gt; ; data: &lt;fault&gt;),
  &lt;DbSomething: 0x1702db970&gt; (entity: DbSomething; id: 0xd0000000019c0012 &lt;x-coredata://FD3BA7EB-B2D7-4133-B209-A94C58949C2F/DbHomeDish/p103&gt; ; data: &lt;fault&gt;),
  &lt;DbSomething: 0x1702db740&gt; (entity: DbSomething; id: 0xd000000002340012 &lt;x-coredata://FD3BA7EB-B2D7-4133-B209-A94C58949C2F/DbHomeDish/p141&gt; ; data: &lt;fault&gt;),
  &lt;DbSomething: 0x1702d9830&gt; (entity: DbSomething; id: 0xd000000002980012 &lt;x-coredata://FD3BA7EB-B2D7-4133-B209-A94C58949C2F/DbHomeDish/p166&gt; ; data: &lt;fault&gt;),
  &lt;DbSomething: 0x1702db820&gt; (entity: DbSomething; id: 0xd000000003240012 &lt;x-coredata://FD3BA7EB-B2D7-4133-B209-A94C58949C2F/DbHomeDish/p201&gt; ; data: &lt;fault&gt;),
  &lt;DbSomething: 0x1702db7b0&gt; (entity: DbSomething; id: 0xd000000003680012 &lt;x-coredata://FD3BA7EB-B2D7-4133-B209-A94C58949C2F/DbHomeDish/p218&gt; ; data: &lt;fault&gt;),
  &lt;DbSomething: 0x1702d7d80&gt; (entity: DbSomething; id: 0xd000000003e00012 &lt;x-coredata://FD3BA7EB-B2D7-4133-B209-A94C58949C2F/DbHomeDish/p248&gt; ; data: &lt;fault&gt;),
  &lt;DbSomething: 0x1702d82c0&gt; (entity: DbSomething; id: 0xd000000004740012 &lt;x-coredata://FD3BA7EB-B2D7-4133-B209-A94C58949C2F/DbHomeDish/p285&gt; ; data: &lt;fault&gt;),
  &lt;DbSomething: 0x1742cf490&gt; (entity: DbSomething; id: 0xd000000004e40012 &lt;x-coredata://FD3BA7EB-B2D7-4133-B209-A94C58949C2F/DbHomeDish/p313&gt; ; data: {
      somethingId = 168;
  })
  )
  </code></pre>
  
  <p>Thanks in advance!</p>