New project and old Core Data Model
<p>I do have an existing project with a Core Data model. I am trying to run a new project (on top of the old model) and read what it's in the model itself. </p>

<p>Now, the app runs smoothly on top of the previous one. I have imported the .xcdatamodeld and nothing is crashing. However when I try to get some values from an Entity that should have some (since I have loaded it before from the old project), I get 0 as results. </p>

<p>I am new to Core Data, so I might be missing something really simple. </p>

<p>This is my current persistentStoreCoordinator (which I have found here: <a href="https://stackoverflow.com/questions/19790558/coredata-after-application-update">Coredata after Application Update</a>): </p>

<pre><code>- (NSPersistentStoreCoordinator *)persistentStoreCoordinator
{
    NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"Model"];
    NSManagedObjectModel *managedObjectModel = [self managedObjectModel];
    NSError *error = nil;
    _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel: managedObjectModel];

    // Check if we already have a persistent store
    if ( [[NSFileManager defaultManager] fileExistsAtPath: [storeURL path]] ) {
        NSLog(@"We have a persistent store!");
        NSDictionary *existingPersistentStoreMetadata = [NSPersistentStoreCoordinator metadataForPersistentStoreOfType: NSSQLiteStoreType URL: storeURL error: &amp;error];
        if ( !existingPersistentStoreMetadata ) {
            // Something *really* bad has happened to the persistent store
            //[NSException raise: NSInternalInconsistencyException format: @"Failed to read metadata for persistent store %@: %@", storeURL, error];
            NSLog(@"Failed to read metadata for persistent store %@: %@", storeURL, error);
        }

        if ( ![managedObjectModel isConfiguration: nil compatibleWithStoreMetadata: existingPersistentStoreMetadata] ) {
            if ( ![[NSFileManager defaultManager] removeItemAtURL: storeURL error: &amp;error] )
                NSLog(@"*** Could not delete persistent store, %@", error);
        } // else the existing persistent store is compatible with the current model - nice!
        NSLog(@"Existing store is compatible!");
    } // else no database file yet

    [_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType
                                              configuration:nil
                                                        URL:storeURL
                                                    options:nil
                                                      error:&amp;error];
    return _persistentStoreCoordinator;
}
</code></pre>

<p>I get the logs "we have a persistent store" and "existing store is compatible", so I am assuming I am actually finding the core data model that is saved on the device. </p>

<p>This is my managedObjectModel: </p>

<pre><code>- (NSManagedObjectModel *)managedObjectModel {
    // The managed object model for the application. It is a fatal error for the application not to be able to find and load its model.

    if (_managedObjectModel != nil) {
        NSLog(@"Not Null!");

        return _managedObjectModel;
    }
   NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"Model" withExtension:@"momd"];
    _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];

    return _managedObjectModel;
}
</code></pre>

<p>This is how I am trying to read the data (I am calling the method in didFinishLaunchingWithOptions):</p>

<pre><code>-(void) readData {

    NSManagedObjectContext *context = [self managedObjectContext];

    if(context != nil)
        NSLog(@"not null");

    NSFetchRequest* request = [NSFetchRequest fetchRequestWithEntityName:@ "StaffAccount"];

    NSError* error = nil;
    NSArray* results = [context executeFetchRequest:request error:&amp;error];

    if (!results || error) { // nil is an error
        // handle error
        NSLog(@"Errore!");

    }

    NSArray *arr = [context executeFetchRequest:request error: &amp;error];

    NSInteger count = [arr count];

    NSLog(@"%ld", (long)count);
}
</code></pre>