Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration from 'release/3.0' to 'maintenance/3.0' #1306

Open
pg19804 opened this issue May 30, 2017 · 0 comments
Open

Migration from 'release/3.0' to 'maintenance/3.0' #1306

pg19804 opened this issue May 30, 2017 · 0 comments

Comments

@pg19804
Copy link

pg19804 commented May 30, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant