objective c - Core Data not saving updates when doing it programmatically. -


I am using CoreData and I would like to update one of the features in one of my models, but I can not find It works to use dot nation. My update action looks like this:

  - (zero) addNewsPostToFavourites: (UIButton *) sender {// true id returns NSLog (@ "Sender Tag:% d", sender.tag); NSNumber * newsPostId = [NSNumber numberHome: sender.tag]; Newspost * Current News Post = [Find Newsstand First Bett: @ Value with "News Post ID": News PostID]; // does not seem to do anything CurrentNewsPost.favourite = @ "true"; }   

I have tried [currentNewsPost setValue: @ "true" forKey: @ "currentNewsPost.favourite"] but it gives me the same result, nothing Happens.

So I wonder what I'm doing wrong.

It should also mention that I am also using the restkit in my project.

Any suggestion will be appreciated

After you update your current Reference must be saved:

  [Self.context save: zero] // You can enter an NSERR;    

Comments