So my problem is that I have a NSManagedObject 'A' which has a has-many relationship to 'b'. So for each object of 'A', there can be many 'b'.
Now, I want to make a copy of 'b', so that 'b' can be modified, but not saved to the store, but 'A' can be saved'.
For example,
self.title = A.name;
setOfB = A.setOfb; // This is still managed by CoreData
temporaryCopyOfB = [setOfB unManagedCopy];// I want to make a copy of b which isn't managed
b = [temporaryCopyOfB objectAtIndex:0];
b.property = newValue;
[A save];
//[setOfB objectAtIndex:0].property should still == oldValue
I know that this isn't particularly clear, but I just want to make a temporary copy of a managed object that I can edit, but not persist the changes even though I'm going to call 'save'.
Let me know if you have any questions, I know I might need to clarify this for you.