• 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
Re: Core Data relationship question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data relationship question


  • Subject: Re: Core Data relationship question
  • From: Felix Franz <email@hidden>
  • Date: Mon, 13 Aug 2007 11:21:24 +0200

On Aug 13, 2007, at 10:54 AM, Alex Reynolds wrote:

Many thanks!

It looks like I can also set the relationship the following way:

NSManagedObject *display = [NSEntityDescription insertNewObjectForEntityForName: @"Display" inManagedObjectContext:managedObjectContext];
[display setValue:targetObject forKey:@"server"];
[display didChangeValueForKey: @"server"];


(The "server" key is a relationship item.)

Compared with your approach, is my approach the wrong way to set up the relationship?

this is correct as well (if the back-relationship is set ...).
You do not need to call the didChangeValueForKey: method. CoreData does this for you internally ...


Cheers,

felix

_______________________________________________

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


References: 
 >Core Data relationship question (From: Alex Reynolds <email@hidden>)
 >Re: Core Data relationship question (From: Felix Franz <email@hidden>)
 >Re: Core Data relationship question (From: Alex Reynolds <email@hidden>)

  • Prev by Date: Re: file reading/writing over 2 gig
  • Next by Date: Re: n00b question about includes
  • Previous by thread: Re: Core Data relationship question
  • Next by thread: Re: Which profile is applied in converting PDF/EPS images from CMYK to RGB?
  • Index(es):
    • Date
    • Thread