• 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
Core Data SQLite I/O error on 10.6
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data SQLite I/O error on 10.6


  • Subject: Core Data SQLite I/O error on 10.6
  • From: Seven Lakes Software <email@hidden>
  • Date: Wed, 9 Sep 2009 11:41:23 +0200

I checked the raw SQLite databases Core Data created under 10.5 and 10.6 with a SQLite tool. The result is pretty interesting.
As said, all databases are created with the same app and therefore the same data model.


The detail is about a many2many, inverse, optional relationship between "PersonalAccount" and "PersonalAccountRebateGroup" entities. Core data created two (?) SQLite tables to manage this relationships. The difference I found is marked with an "!":

Database created under 10.5:
Table: Z_75PERSONALACCOUNTREBATEGROUPS
Column1 name: Z_75PERSONALACCOUNTS
Column2 name: Z_48PERSONALACCOUNTREBATEGROUPS
Table: Z_75PRICELISTS
Column1 name: Z_75PERSONALACCOUNTS1
Column2 name: Z_50PRICELISTS

Database created under 10.6:
Table: Z_75PERSONALACCOUNTREBATEGROUPS
Column1 name: Z_75PERSONALACCOUNTS1  "!"
Column2 name: Z_48PERSONALACCOUNTREBATEGROUPS
Table: Z_75PRICELISTS
Column1 name: Z_75PERSONALACCOUNTS "!"
Column2 name: Z_50PRICELISTS

Once again the error message:
I/O error for database at /databasepath... SQLite error code:1, 'no such column: t1.Z_75PERSONALACCOUNTS1'
Seems I'm looking at the right place...


It looks like Snow Leopard "translates" the SQLite column names different than Leopard in this case.

How could this problem be solved?
a) export all data under 10.5 and re-import under 10.6?: quite a hassle with 80 entities and very complicated business logic
b) edit each customer database with a SQLite tool to fit for 10.6?


Norbert
Seven Lakes Software

Am 08.09.2009 um 14:25 schrieb Seven Lakes Software:

Hello!

I updated my Mac from 10.5 to 10.6 yesterday.
Using the app I developed under 10.5 with a Core Data SQLite store created under 10.5 I get the following error under 10.6:
"I/O error for database at /Users/norbert/Library/Application Support/Grosshandel/Grosshandel.grosshandelstore. SQLite error code: 1, 'no such column: t1.Z_75PERSONALACCOUNTS1'"


This error does NOT occur when I create a new Core Data SQLite store with the same app under 10.6.
I didn NOT edit the store with SQLite directly, of course.


The Entitiy names affected may be "PersonalAccount" and PersonalAccountRebateGroup" which are related with an optional many- to-many relationship named "personalAccountRebateGroups" / "personalAccounts".

Seems to be a problem deeply in Core Data. I have no idea how to resolve this. I will get a HUGE problem when my existing customers update from 10.5 to 10.6.

Norbert
_______________________________________________

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

_______________________________________________

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


References: 
 >Core Data SQLite I/O error on 10.6 (From: Seven Lakes Software <email@hidden>)

  • Prev by Date: Re: KVO can be unsafe in -init?
  • Next by Date: Re: KVO can be unsafe in -init?
  • Previous by thread: Core Data SQLite I/O error on 10.6
  • Next by thread: NSTableView doesn't increase the number of elements in table?
  • Index(es):
    • Date
    • Thread