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

Core Data relationship disappears


  • Subject: Core Data relationship disappears
  • From: Ivan C Myrvold <email@hidden>
  • Date: Sat, 31 Jan 2009 17:33:14 +0100

I have an Entity named ServiceItem which have a relationship to another Entity named Transponder.
I am creating the ServiceItem by looping through a text file, scanning for a service item pattern, and create the object with a newObject message to an NSArrayController.


 ServiceItem *serviceItem = [oservicesArrayController newObject];

The Transponder entity I have created similarly, and saved into an NSDictionary.
Setting the transponder relationship for a ServiceItem, I do:


 Transponder *transponder = [transDict objectForKey:transString];
 [serviceItem setTransponder:transponder];

I can see that the transponder relationship is set in an NSLog:

2009-01-31 16:57:05.596 MyrDream[14520:10b] serviceItem: <ServiceItem: 0x173086f0> (entity: ServiceItem; id: 0x17308750 <x-coredata:///ServiceItem/t252F7A01-BE3C-4945-B3F3-11FE1CE644892269 > ; data: {
channel = nil;
channelName = "TV 2 Norge";
package = "Telenor,c:000202,c:01029c,c:020242,c:030202,C:0b00";
serviceType = 1508;
serviceTypeString = TV;
sid = 1508;
specialFlags = 0;
transponder = 0x16d3b9f0 <x-coredata:///Transponder/t252F7A01-BE3C-4945-B3F3-11FE1CE64489141 >;
})


But later on, the transponder relationship have been set to nil, and I don't know why. There is probably something missing in my core data code.
Do anyone know what I am missing?


2009-01-31 16:57:05.751 MyrDream[14520:10b] makeTransponders 2 serviceItem: <ServiceItem: 0x173086f0> (entity: ServiceItem; id: 0x17308750 <x-coredata:///ServiceItem/t252F7A01-BE3C-4945-B3F3-11FE1CE644892269 > ; data: {
channel = nil;
channelName = "TV 2 Norge";
package = "Telenor,c:000202,c:01029c,c:020242,c:030202,C:0b00";
serviceType = 1508;
serviceTypeString = TV;
sid = 1508;
specialFlags = 0;
transponder = nil;
})


_______________________________________________

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 relationship disappears
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: Newbie Object Sharing Question
  • Next by Date: Re: Can we render QCRenderer in CAOpenGLLayer..?
  • Previous by thread: Re: -stringByEvaluatingJavaScriptFromString: return value iphone
  • Next by thread: Re: Core Data relationship disappears
  • Index(es):
    • Date
    • Thread