Possible Duplicate:
Store But Don't Save NSManagedObject to CoreData?
I need to make an NSManagedObject without saving it, how can I do this?
The reason I want to do this is the app has a setup in which the user enters their details, however I only want to save the object if they complete the setup (they have the option to cancel, in which case the object needs to be discarded without being saved, which is why I don't want to insert it straight away).
I have tried insetting one without a context but the app crashes.
I have tried the following:
GuestInfo *guest;
guest = (GuestInfo *)[NSEntityDescription insertNewObjectForEntityForName:@"GuestInfo" inManagedObjectContext:nil];
This causes the crash with the following error message:
'NSInternalInconsistencyException', reason: '+entityForName: could not locate an NSManagedObjectModel for entity name 'GuestInfo''