views:

70

answers:

1

Hi,

I seem to recall that it's possible to return the resulting object count from an NSPredicate in CoreData without actually performing a fetch, but I can't find any reference to this.

Can someone confirm that I wasn't dreaming (sad dream to have!), and would this be safe to do in another thread?

Thanks

Andy

+1  A: 

See this answer to this question. You just need to add your predicate to the fetch request in the provided code.

Brad Larson
[moc countForFetchRequest:request error:Great, thanks very much
Andrew