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

Core Data add object


  • Subject: Core Data add object
  • From: Ivan C Myrvold <email@hidden>
  • Date: Sun, 25 May 2008 13:08:45 +0200

I have a core data project with two entities, Call and CallEvent.
In the Call entity, I have a to-many relationship to CallEvent.

I create the two objects in code with

thecall = [NSEntityDescription insertNewObjectForEntityForName:@"Call" inManagedObjectContext:[self managedObjectContext]];
and
thecallevent = [NSEntityDescription insertNewObjectForEntityForName:@"CallEvent" inManagedObjectContext: [self managedObjectContext]];


I now want to add the callevent object to thecall object. I see in the NSManagedObject subclass Call there is a method prepared for this,
- (void)addCallEventsObject:(CallEvent *)value;


simply doing
[thecall addCallEventsObject:thecallevent];

is not working, of course. So how do I add this object?

Ivan
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Core Data add object
      • From: Ivan C Myrvold <email@hidden>
    • Re: Core Data add object
      • From: mmalc crawford <email@hidden>
  • Prev by Date: Re: How to Delay, Wait, Pause...
  • Next by Date: Re: Core Data add object
  • Previous by thread: Re: Problem configuring NSToolbarItem in IB
  • Next by thread: Re: Core Data add object
  • Index(es):
    • Date
    • Thread