Closed lukestringer90 closed 9 years ago
This would make it unnecessary to pass the managedObjectContext as a parameter - just use self. managedObjectContext.
Isn't this accomplished in contextSaveNotificationReceived instead? At this line: https://github.com/3squared/SQKDataKit/blob/a820817dbb66165d14aa71dc0a57d21b6a326eef/Classes/shared/SQKCoreDataOperation/SQKCoreDataOperation.m#L137
it checks that managedObjectContext == self.managedObjectContextToMerge
- doesn't that enforce this behaviour?
Well spotted, it looks like this is checked else where so this is not necessary.
To address your previous comment regarding passing the managedObjectContext as being unnecessary: I agree and I think then method name should be changed. I'll close this issue and open a new one to discuss further.
When
completeOperationBySavingContext:
is called theSQKCoreDataOperation
should check that the specified context is the same context as was created during thestart
method.A possible solution: