Migration from 'release/3.0' to 'maintenance/3.0'
pg19804 opened this issue · 0 comments
Hi,
I'm working on a project that contains MagicalRecord 'release/3.0', and i'm trying to migrate to 'maintenance/3.0'. My understanding is that it should be a straightforward operation, however, i'm running into several issues, that i'm going to describe bellow:
The first problem, is that after updating to latest version of branch 'maintenance/3.0', the project won't compile, getting the following errors:
- .../MagicalRecordShorthand.m:406:18: No known class method for selector 'MR_confinementContext'
- .../MagicalRecordShorthand.m:411:18: No known class method for selector 'MR_confinementContextWithParent:'
And in fact, in the maintenance branch, these methods do not exist anymore, however they're still being used in some methods....Am i missing something here? shouldn't that code be gone? Commenting those references, the build in done successfully.
The second problem, is related with the following method:
- (void)saveWithBlock:(void (^)(NSManagedObjectContext *localContext))block completion:(MRSaveCompletionHandler)completion;
Running this method, sometime i get the following error (it did not happen before):
+entityForName: nil is not a legal NSPersistentStoreCoordinator for searching for entity name ...
Investigating a little bit of the method implementation in both branches there is a difference:
Maintenance/3.0 --> NSManagedObjectContext *localContext = [self newPrivateContext];
release/3.0 --> NSManagedObjectContext *localContext = [self newConfinementContext];
If i change [self newPrivateContext] with [self context], the problem goes away, however i wouldn't be using a private context anymore...
And of course, these kind of tweaks shouldn't be done anyway...
Does this make sense to any of you guys?
Thanks in advance