[SOLVED]: CoreData.. Relationship Not Persisting
[SOLVED]: CoreData.. Relationship Not Persisting
- Subject: [SOLVED]: CoreData.. Relationship Not Persisting
- From: Chris Schmitt <email@hidden>
- Date: Wed, 6 Feb 2008 13:18:06 -0500
I figured out what was going on.. Everything was working as expected
excepted, I was adding the same element over and over again, instead
of adding the new element. Copy and paste bug.
Begin forwarded message:
From: Chris Schmitt <email@hidden>
Date: February 6, 2008 12:54:14 PM EST
To: email@hidden
Subject: CoreData.. Relationship Not Persisting
I have a strange problem happening with my core data application. I
am programmatically a entity to a relationship using the following
steps:
1. Get a reference to the parent entities relationship set using
the relationship accessor (entity.relationshipName).
2. Use the addObject method of the MSMutableSet to add the new
relationship.
This all works great. When I move around in my application the
bindings are there and everything is working fine. When I quit my
application the changes are "saved" out to the presistant store and
I receive no errors.
My problem is, when I re-run my application the link is gone. It is
never saved out to the store.
I have even add a save call to the managedObjectContent at the end
of my routine to insure that the changes are saved and I get no error.
Any advice or help would be great.
Thanks
_______________________________________________
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