I created an app for iPad, and there’s two n-n model named “article” and “tag”, created an article with
[NSEntityDescription insertNewObjectForEntityForName:@"Article" inManagedObjectContext:managedObjectContext];
and navigate to article edit screen. This screen has a popover controller to select tags for this article, and on this popover controller user can add a tag.
Now, when I saved the tag with
[managedObjectContext save:&error]
this editing article will be save also. However, I don’t want to save the article at this point.
The question is, how to save “tag” without saving the article?
I tried to create a new managedObjectContext for tag, but it doesn’t work.
You can have multiple data store and use one for tag and one for article but I think this contains too much overhead.
You could try use two managed object context but I don’t know what exactly happened if do so.
Why don’t you want to save article?
You may have an oldArticle attribute and restore you unwanted saved arctic to it after you save the context while keep the unsaved article somewhere safe.