Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data: How do you count records in a persistent store?




On Apr 2, 2006, at 11:16 AM, Frederick C. Lee wrote:

How do you count (or determine empty) data from a persistent store (table)?

Execute a fetch for the entity in which you're interested, and count the returned array.

I've been trying to use the '@count' qualifier to determine if I have data
in a particular MO entity:
(gdb) po [[[[[managedObjectContext persistentStoreCoordinator]
managedObjectModel] entities] objectAtIndex:6] valueForKey:@"name.@count"]


It's not clear why you would try doing this?

mmalc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Core Data: How do you count records in a persistent store? (From: "Frederick C. Lee" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.