• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Core Data: How do you count records in a persistent store?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: Core Data: How do you count records in a persistent store?
  • From: "Frederick C. Lee" <email@hidden>
  • Date: Sun, 2 Apr 2006 11:16:38 -0700

This is a very simple question, yet I keep screwing it up.

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

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"]


Program received signal SIGTRAP, Trace/breakpoint trap.
0x92902340 in _NSRaiseError ()
2006-04-02 11:12:15.092 eWorld[630] An uncaught exception was raised
2006-04-02 11:12:15.093 eWorld[630] [<NSEntityDescription 0x3826150> valueForUndefinedKey:]: this class is not key value coding-compliant for the key name.@count.
2006-04-02 11:12:15.094 eWorld[630] *** Uncaught exception: <NSUnknownKeyException> [<NSEntityDescription 0x3826150> valueForUndefinedKey:]: this class is not key value coding-compliant for the key name.@count.
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function (objc_msgSend) will be abandoned.
(gdb)



Regards,

Ric.
_______________________________________________
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


  • Follow-Ups:
    • Re: Core Data: How do you count records in a persistent store?
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Apple-style expanding preferences panel
  • Next by Date: Extracting file name & path from NSOpenPanel
  • Previous by thread: Re: Apple-style expanding preferences panel
  • Next by thread: Re: Core Data: How do you count records in a persistent store?
  • Index(es):
    • Date
    • Thread