• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CoreData "I/O error for database: no such table"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CoreData "I/O error for database: no such table"


  • Subject: CoreData "I/O error for database: no such table"
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 04 Aug 2011 14:30:34 -0600

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...

Nick Zitzmann
<http://www.chronosnet.com/>

[1] http://www.cocoabuilder.com/archive/cocoa/306002-core-data-o-error-no-such-column.html

_______________________________________________

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

  • Follow-Ups:
    • Re: CoreData "I/O error for database: no such table"
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: Menu Item Key Equivalent
  • Next by Date: Re: Menu Item Key Equivalent
  • Previous by thread: Re: view:(QTMovieView *)view willDisplayImage:
  • Next by thread: Re: CoreData "I/O error for database: no such table"
  • Index(es):
    • Date
    • Thread