small medium large xlarge

Back to: All Forums  Core Data
Paul54729_pragsmall
20 Jun 2010, 14:34
Paul Johnson (21 posts)

The ProgressiveMigration project in the downloads does not build. The build process gets two fatal errors compiling the mapping model “v1_to_v2.xcmappingmodel”. I’m using the latest versions of Xcode (3.2.2).

(It appears that v2.xcdatamodel is actually a duplicate of v3.xcdatamodel. I’ll try grabbing v2.xcdatamodel from another project and report on my results.)

Paul54729_pragsmall
22 Jun 2010, 02:42
Paul Johnson (21 posts)

I didn’t bother trying to get the ProgressiveMigration project working. Instead, I added progressiveMigrateURL:ofType:toModel:error to my GrokkingRecipes program (which I have under version control using Subversion). Of course, the call to this method also needed to be added.

The code in section 5.7 (Progressive Data Migration) seems to work as advertised.

I did find some errors in setting up the data model versions (using the Data Modeler). They were mostly wrongly checked/unchecked “Optional” switches, but once I had fixed them the program worked. I found it very easy to make small errors in the Data Modeler. :)

Paul54729_pragsmall
22 Jun 2010, 02:48
Paul Johnson (21 posts)

Incidentally, here are the errors I got when I tried to run the downloaded ProgressiveMigration project:

Cannot perform operation since entity with name ‘Ingredient’ cannot be found Cannot perform operation since entity with name ‘UnitOfMeasure’ cannot be found the entity Recipe is not key value coding-compliant for the key “author”. Cannot perform operation since entity with name ‘Author’ cannot be found [<NSManagedObject 0x13f580> addObserver:<NSTableBinder 0x144b30> forKeyPath:@”ingredient.name” options:0x0 context:0x0] was sent to an object that is not KVC-compliant for the “ingredient” property. [<NSManagedObject 0x1192a0> valueForUndefinedKey:]: the entity RecipeIngredient is not key value coding-compliant for the key “ingredient”. [<NSManagedObject 0x1192a0> valueForUndefinedKey:]: the entity RecipeIngredient is not key value coding-compliant for the key “ingredient”. [<NSManagedObject 0x1192a0> valueForUndefinedKey:]: the entity RecipeIngredient is not key value coding-compliant for the key “ingredient”. [<NSManagedObject 0x1192a0> valueForUndefinedKey:]: the entity RecipeIngredient is not key value coding-compliant for the key “ingredient”. [<NSManagedObject 0x1192a0> valueForUndefinedKey:]: the entity RecipeIngredient is not key value coding-compliant for the key “ingredient”. [<NSManagedObject 0x1192a0> valueForUndefinedKey:]: the entity RecipeIngredient is not key value coding-compliant for the key “ingredient”. [<NSManagedObject 0x1192a0> valueForUndefinedKey:]: the entity RecipeIngredient is not key value coding-compliant for the key “ingredient”.

Avatarsmall_pragsmall
22 Jun 2010, 15:37
Marcus S. Zarra (284 posts)

Looks like a copy paste error in the sample code. I will have an update pushed up as soon as possible.

You must be logged in to comment