Dear list,

Something's not right with the world. I wanted to add a new boolean flag to my 
NSPersistentDocument core data model. So I selected the last version (11) and 
added a new version based on that (via the Editor menu). Then I carefully 
selected another file and then the version 12 model to work around the nice 
Xcode bug where the new version is selected in the project tree, but the old 
version is still in the editor. Then I added a new attribute to one of the core 
data entities and set it to boolean with a default of NO. I added the 
appropriate @property and @dymanic lines to the entity NSManagedObject 
subclass. Then I set the current version of the model to be this new one (12). 
Then I go to open an existing document and I get the dreaded "migration failed, 
missing source managed object model" error. Clearly I'm on version 11 so I've 
done this procedure at least 10 times before. So why is it failing now? I've 
confirmed that the version 11 mom and the version 12 mom is in the app bundle. 
I'm using Xcode 4.6.3. Anyone got any clues? I've switched on core data 
migration debug flag and I get the  (snipped) output below. It doesn't really 
help me, however.

Hoping for clues,

Martin

---

2013-06-17 20:43:15.098 TeXnicle[56319:303] CoreData: annotation: Incompatible 
version schema for persistent store 'file://XXXXX'.  store metadata = {
    NSPersistenceFrameworkVersion = 407;
    NSStoreModelVersionHashes =     {
        
<snip>

    };
    NSStoreModelVersionHashesVersion = 3;
    NSStoreModelVersionIdentifiers =     (
        "",
        5
    );
    NSStoreType = XML;
    NSStoreUUID = "12F032C3-C21C-453B-A589-72F191A8F53D";
    kMDItemKeywords =     (
        testModel
    );
} and current model versions = {

<snip>

}
2013-06-17 20:43:15.099 TeXnicle[56319:303] CoreData: annotation: (migration)   
 will attempt automatic schema migration
2013-06-17 20:43:15.215 TeXnicle[56319:303] CoreData: error: (migration) 
migration failed with error Error Domain=NSCocoaErrorDomain Code=134130 
"Persistent store migration failed, missing source managed object model." 
UserInfo=0x107d11270 {URL=file://XXXXX, metadata=<CFBasicHash 0x106d8a120 
[0x7fff75f12110]>{type = immutable dict, count = 7,
entries =>

<snip>

}
, reason=Can't find model for source store}
Error User Info: {
    URL = "file://XXXX";
    metadata =     {
        NSPersistenceFrameworkVersion = 407;
        NSStoreModelVersionHashes =         {

<snip>

        };
        NSStoreModelVersionHashesVersion = 3;
        NSStoreModelVersionIdentifiers =         (
            "",
            5
        );
        NSStoreType = XML;
        NSStoreUUID = "12F032C3-C21C-453B-A589-72F191A8F53D";
        kMDItemKeywords =         (
            testModel
        );
    };
    reason = "Can't find model for source store";
}
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to