Re: Core Data: How do you count records in a persistent store?
Re: Core Data: How do you count records in a persistent store?
- Subject: Re: Core Data: How do you count records in a persistent store?
- From: mmalcolm crawford <email@hidden>
- Date: Sun, 2 Apr 2006 12:21:45 -0700
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:
This email sent to email@hidden