After upgrading to lion, the following error prevents successful compilation of a core data model:
core-data-model/MyModel.xcdatamodeld:0: error: Compilation failed for data model at path 'resources/MyModel.momd/MyModel.mom'
This is the result of executing the following command:
/Developer/usr/bin/momc core-data-model/MyModel.xcdatamodeld resources/MyModel.momd
Note that this command is executing in a custom build script independently of xcode, and that it ran without problems before upgrading to Lion.
I've read of model compilation errors after upgrading to Lion (for instance see this question), but the solutions detailed there do not seem to apply.
Anyone else encounter problems manually invoking model compilation after upgrading to Lion? Any ideas? Thanks.
Figured it out - it seems like the object model compiler now expects the destination path to be absolute. This works:
/Developer/usr/bin/momc core-data-model/MyModel.xcdatamodeld /Users/amos/projects/my-project/resources/MyModel.momd
I was also getting this error because I had a bad inverse relationship in my model :
I fixed it by splitting it into two inverse relationships :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With