Hello,
I'm working with Core-Data.
I've a simple cd structure (look here: ) with two entities: Draft and
Data. Draft contains some infos about the draft itself while the data
entity contains the body of the draft (I've used it in order to avoid
to load the entire article while I need to put some basic info in a
tableview).
Now I need to store the body into the body. My statments are:

NSManagedObject *linkedData = [draftObj valueForKey: DraftPackage_LinkedBody];
[linkedData setValue: [[ass_editingTextView textStorage] string]
forKey: DraftPackage_DataBody];

It's simple...but it does not works. I've tried to  put an NSLog at
the end of the second line and the data was written correctly into the
entity but, when I read it again (for example when I select the draft
from the table) it returns the old value (or a empty string?!!?).
These operations was made inside the main managedobjectcontext and
inside the main app thread.
I've tried to make a refreshObject:mergeChanges with YES in merge but
it does not work.
Same thing by doing processPendingChanges.
I've also tried to saving it to disk with save: command.
What's the way to propagate changes, insert, deletes? Need I to fetch
this entity instead of taking it from draftObject relationship?
Thanks a lot.
malcom
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to