Create an NSManagedObject Without Saving?
Posted
by
Josh Kahane
on Stack Overflow
See other posts from Stack Overflow
or by Josh Kahane
Published on 2012-04-15T22:10:07Z
Indexed on
2012/04/15
23:28 UTC
Read the original article
Hit count: 275
I need to make an NSManagedObject without saving it, how can I do this?
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''
This causes the
Hope you can help, thanks.
© Stack Overflow or respective owner