Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6700439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:48:52+00:00 2026-05-26T06:48:52+00:00

Since the iOS 5 Betas I have been testing my app’s code and the

  • 0

Since the iOS 5 Betas I have been testing my app’s code and the lightweight migration bit for my Core Data model has been failing. I get the “no such column: FOK_REFLEXIVE” error, but strangely I get it on the first run on devices and the simulator when no older version is present. I have changed nothing since the iOS 4.x code that worked beautifully.

The full error gives no extra information about the error and after pounding my head on the table for a bit I may have narrowed down the error to a reflexive relationship in my data model. Name has a many-to-many relationship with Name via a relationship called, names. (The idea is that Rob is related to Bob and Robert, etc). Can this all of a sudden be taboo in iOS 5?

Also, does Core Data run through every version of the data model and migrate for each no matter what version of the data model the app should be using? It’s strange to get a migration error on an app being run for the very first time I would think.

Here’s the only related code although it’s Marcus Zarra’s code which I believe everyone on Earth is using.

- (NSPersistentStoreCoordinator *)persistentStoreCoordinator
{
    if (persistentStoreCoordinator_ != nil) {
        return persistentStoreCoordinator_;
    }

    NSURL *storeURL = [NSURL fileURLWithPath: [[self applicationDocumentsDirectory] stringByAppendingPathComponent: @"Saline.sqlite"]];

    NSError *error = nil;
    persistentStoreCoordinator_ = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
    if (![persistentStoreCoordinator_ addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil] error:&error])
    {
        NSLog(@"Schema changes...");
        NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
        abort();
    }

    return persistentStoreCoordinator_;
}

UPDATE: Full error follows

2011-10-20 08:14:17.700 Saline[28315:207] CoreData: error: (1) I/O error for database at /Users/rob5408/Library/Application Support/iPhone Simulator/5.0/Applications/865AD162-49BC-4809-A63A-23E6D5A5E5C4/Documents/.Saline.sqlite.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3.  SQLite error code:1, 'no such column: FOK_REFLEXIVE'
2011-10-20 08:14:17.731 Saline[28315:207] Schema changes...
2011-10-20 08:14:17.732 Saline[28315:207] Unresolved error Error Domain=NSCocoaErrorDomain Code=134110 "The operation couldn’t be completed. (Cocoa error 134110.)" UserInfo=0x6f7b2d0 {destinationURL=file://localhost/Users/rob5408/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/865AD162-49BC-4809-A63A-23E6D5A5E5C4/Documents/.Saline.sqlite.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3, reason=Cannot migrate store in-place: I/O error for database at /Users/rob5408/Library/Application Support/iPhone Simulator/5.0/Applications/865AD162-49BC-4809-A63A-23E6D5A5E5C4/Documents/.Saline.sqlite.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3.  SQLite error code:1, 'no such column: FOK_REFLEXIVE', NSUnderlyingError=0x6f7cda0 "The operation couldn’t be completed. (Cocoa error 134110.)", sourceURL=file://localhost/Users/rob5408/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/865AD162-49BC-4809-A63A-23E6D5A5E5C4/Documents/Saline.sqlite}, {
NSUnderlyingError = "Error Domain=NSCocoaErrorDomain Code=134110 \"The operation couldn\U2019t be completed. (Cocoa error 134110.)\" UserInfo=0x6f75780 {NSSQLiteErrorDomain=1, NSFilePath=/Users/rob5408/Library/Application Support/iPhone Simulator/5.0/Applications/865AD162-49BC-4809-A63A-23E6D5A5E5C4/Documents/.Saline.sqlite.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3, reason=I/O error for database at /Users/rob5408/Library/Application Support/iPhone Simulator/5.0/Applications/865AD162-49BC-4809-A63A-23E6D5A5E5C4/Documents/.Saline.sqlite.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3.  SQLite error code:1, 'no such column: FOK_REFLEXIVE', NSUnderlyingException=I/O error for database at /Users/rob5408/Library/Application Support/iPhone Simulator/5.0/Applications/865AD162-49BC-4809-A63A-23E6D5A5E5C4/Documents/.Saline.sqlite.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3.  SQLite error code:1, 'no such column: FOK_REFLEXIVE'}";
destinationURL = "file://localhost/Users/rob5408/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/865AD162-49BC-4809-A63A-23E6D5A5E5C4/Documents/.Saline.sqlite.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3";
reason = "Cannot migrate store in-place: I/O error for database at /Users/rob5408/Library/Application Support/iPhone Simulator/5.0/Applications/865AD162-49BC-4809-A63A-23E6D5A5E5C4/Documents/.Saline.sqlite.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3.  SQLite error code:1, 'no such column: FOK_REFLEXIVE'";
sourceURL = "file://localhost/Users/rob5408/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/865AD162-49BC-4809-A63A-23E6D5A5E5C4/Documents/Saline.sqlite";
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:48:52+00:00Added an answer on May 26, 2026 at 6:48 am

    Core Data migration only migrations from the existing store to the current model. It will not go through every model type. So you need to make sure you can migration from whatever the store is in to what the current model is.

    Did you actually name an attribute FOK_REFLEXIVE? Is this perhaps a sqlite store being created by something other than Core Data?

    What is the full error?

    A migration will only occur when there is a store to migrate. I would test to see if there is a file on disk when you get an error as that would be the only thing that would kick off a migration.

    UPDATE

    This really points to an existing file. Since you are running in the simulator what happens if you just look using the console?

    ls -la /Users/rob5408/Library/Application Support/iPhone Simulator/5.0/Applications/865AD162-49BC-4809-A63A-23E6D5A5E5C4/Documents
    

    What do you see? Or try:

    find /Users/rob5408/Library/Application Support/iPhone Simulator | grep sqlite
    

    Another option is to turn on SQL debug and lets see what the output is. You can do this by adding the argument -com.apple.CoreData.SQLDebug 3 to your executable and watching the console output. I would be interested in seeing the results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been compiling and using the following code since iOS 4.0: if(UIGraphicsBeginImageContextWithOptions != NULL)
So, I've been making iOS apps since the first iPod touch came out, but
Since the iOS 5 upgrade, we have had intermittent reports of a missing back
I'm working on an iOS app. It currently only works on iOS 4 since
since I updated to xcode 4.2 and iOS 5 following code has no effect:
I've downloaded the iOS 5 beta and want to test my app, but since
Since I am new to iOS development I have a few Questions. Firstly I
When testing our iOS app, my team and I need to disable SSL certificate
I'm trying to get the basics of iOS programming down. I have an app
in an iOS app I have to display a list of text items that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.