I have this code:
Entry *entry = [Entry create];
NSOrderedSet *media = [[NSOrderedSet alloc] init];
entry.media = media;
EntryTableInfo *entryTableInfo = [[EntryTableInfo alloc] init];
entry.entryTableInfo = entryTableInfo;
[[CoreDataStore mainStore] save];
And when it saves, it's giving me the error Illegal attempt to establish a relationship between objects in different contexts
.
The NSOrderedSet
code was already there, and was working fine. The EntryTableInfo
code wasn't, that's new, and that's the cause of the crash, but I'm not sure why?