• 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 data access
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data data access


  • Subject: Core Data data access
  • From: Dan Grassi <email@hidden>
  • Date: Thu, 30 Mar 2006 14:31:07 -0500

I have started a simple project with a code less Core Data application that used a SQLite DB backend. Everything works fine. Now I want to access the data and am having no luck. I have tried:

NSDictionary* entities = [managedObjectModel entitiesByName];
NSEntityDescription* entity = [entities valueForKey:@"Device"];
NSFetchRequest* fetch = [[NSFetchRequest alloc] init];
[fetch setEntity: entity];
NSArray* results = [managedObjectContext executeFetchRequest:fetch error:nil];
NSEnumerator *enumerator = [results objectEnumerator];
NSManagedObject* managedObject;
while (managedObject = [enumerator nextObject])
NSLog(@"PropertyName : %@", [managedObject valueForKey:@"PropertyName"]);


I get:
2006-03-30 14:28:24.440 ProjectName[11524] Exception raised during posting of notification. Ignored. exception: [<NSManagedObject 0x3e0510> valueForUndefinedKey:]: this class is not key value coding- compliant for the key PropertyName.


Surely it must be easy to get the data and even the property names.

Can someone please help?

Dan

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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 data access
      • From: Scott Ellsworth <email@hidden>
    • Re: Core Data data access
      • From: Wain <email@hidden>
  • Prev by Date: Cocoa Software Dev. Position Open - San Diego
  • Next by Date: Opening a window in Core Data application
  • Previous by thread: Cocoa Software Dev. Position Open - San Diego
  • Next by thread: Re: Core Data data access
  • Index(es):
    • Date
    • Thread