Re: CoreData "I/O error for database: no such table"
Re: CoreData "I/O error for database: no such table"
- Subject: Re: CoreData "I/O error for database: no such table"
- From: Keary Suska <email@hidden>
- Date: Fri, 05 Aug 2011 09:55:19 -0600
On Aug 4, 2011, at 2:30 PM, Nick Zitzmann wrote:
> I tried searching around and found one other person who had the same problem[1], but no one followed up with a good solution for existing databases.
>
> I have an entity with a many-to-many relationship to itself, called "parents" and "children". And when I take a database that was made by an application built by Xcode 3.2.6 and move that application to Xcode 4.1, I'm now getting this error when trying to look up something in that entity:
>
> I/O error for database at /path/to/mydatabase.db. SQLite error code:1, 'no such table: Z_16PARENTS'
>
> It looks like the model compiler made a subtle change to the many-to-many table that is part of the model used to make the database during the switch. How do I make it so that it uses the same tables that it used to use? Throwing out and rebuilding the existing database is not an option.
>
> I already tried changing the Mac OS X deployment target, since I noticed that the deployment target is passed to momc, but that did not make any difference.
>
> I was able to work around the problem by creating a custom build rule that builds the data model using Xcode 3's momc tool instead of Xcode 4's tool, and while that did solve the problem, there has got to be a better way. But what is that way? I can't believe Xcode 4 would ship with such a regression in momc...
>
Depending on the number of differences you could simply fire up the sqlite client and rename the tables in the database to what the new model compiler generates.
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden