• 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
Relationships during awakeFromInsert
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Relationships during awakeFromInsert


  • Subject: Relationships during awakeFromInsert
  • From: Mike Rossetti <email@hidden>
  • Date: Fri, 1 Feb 2008 22:20:26 -0700

In my Core Data Document based application, I need to initialize some attributes in instances one class (MOB) using attributes from another class (MOA, which is the root object of the document) to which the first is related. Here is what the classes each look like:

	MOA
	_____
	aTitle - string
	seed - double
	myMOBs - one-to-many relationship to MOB


MOB _____ bTitle - string seeded - double myMOA - many-to-one relationship to MOA


In MOB's awakeFromInsert I have the following:

	- (void)awakeFromInsert
	{
		[super awakeFromInsert];

		MOA* anMOA = self.myMOA;
		self.seeded = anMOA.seed;
	}

What I'm seeing is that self.myMOA is 'nil' in this awakeFromInsert, so apparently the relationship has not yet been established. I've tried intercepting setValue:forKey: and setPrimitiveValue:forKey: but they don't appear to be called during creation of an MOB.

Where can I set MOB's 'seeded' using MOA's 'seed'?
_______________________________________________

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


  • Prev by Date: Re: new API for MacBook Air for Multi-touch trackpad?
  • Next by Date: Re: mouseDown: with Core Animation
  • Previous by thread: Re: new API for MacBook Air for Multi-touch trackpad?
  • Next by thread: re: Relationships during awakeFromInsert
  • Index(es):
    • Date
    • Thread