I a, working on coredata iphone TabBar app and passing appdelegate managedObjectContext to all the views and subviews.At some instance i need to create new record for entity A and while entity A didn’t saved by the user i need to create another entity B by using the same shared context. Now, my problem is if i save the context for entity B, then it will save the entity A as well. I don’t want to save entity A until or less user didn’t want to save it.
I can see only one way to go is creating separate context for entity B or something else….?
Please help me to slove this issue.
Thanks,
You can:
I almost always go with (3). It’s the simplest and safest method by far. Since it mimics what the user is actually doing i.e. creating a data object and then deciding to throw it away, it is good design practice as well.