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

setting default context missing? #19

Closed
Khoulaiz opened this issue Sep 7, 2014 · 2 comments
Closed

setting default context missing? #19

Khoulaiz opened this issue Sep 7, 2014 · 2 comments
Assignees
Milestone

Comments

@Khoulaiz
Copy link

Khoulaiz commented Sep 7, 2014

Hi!
I am trying to use SugarRecord and got some assertions. I've checked the reason and I think the following function is missing a line:

class func initializeContextsStack(persistentStoreCoordinator: NSPersistentStoreCoordinator) {
        SugarRecordLogger.logLevelInfo.log("Creating contexts stack")
        var rootContext: NSManagedObjectContext = NSManagedObjectContext.newContext(nil, persistentStoreCoordinator: persistentStoreCoordinator)
        NSManagedObjectContext.setRootSavingContext(rootContext)
        var defaultContext: NSManagedObjectContext = NSManagedObjectContext.newContext(rootContext, persistentStoreCoordinator: nil)
}

Isn't there a line

        NSManagedObjectContext.setDefaultContext(defaultContext)

missing?

@pepicrft
Copy link

pepicrft commented Sep 8, 2014

Right @Khoulaiz , opening the issue . Thanks for the report

@pepicrft pepicrft added this to the 0.2.1 milestone Sep 8, 2014
@pepicrft pepicrft self-assigned this Sep 8, 2014
@pepicrft
Copy link

pepicrft commented Sep 8, 2014

Fixed in develop @Khoulaiz
#20

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

2 participants