> In Tiger that was the best means available, but if you're targeting Leopard
 there is a better option available:

  Create your fetch request to fetch all instances of a given entity and
 execute the fetch with countForFetchRequest:error: which will simply return
 the number of instances/rows that match your query.

  Though Steve mentioned off-list that he's targeting Tiger, I had
managed to completely forget about this method - my apologies for the
misinformation.

Well, it's probably best to ask the NSManagedObjectContext -respondsToSelector:@selector(countForFetchRequest:error:) and use the slow -executeFetchRequest:error: if the result is NO.

--

-Ben
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to