• 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
Baffling error migrating Core Data store
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Baffling error migrating Core Data store


  • Subject: Baffling error migrating Core Data store
  • From: Graham Perks <email@hidden>
  • Date: Wed, 27 Jun 2007 00:17:00 -0500

My Core Data upgrade code works great as long as I am upgrading from a binary store to a new binary store. It even works great when migrating to an XML store.

Sadly, migrating to a SQLite store results in an error.

When saving the object context to SQLite (I call [NSManagedObjectContext save]), down the stack NSSQLiteConnection's insertRow: calls execute:, which tries calling [NSConcreteAttributedString bytes]. There is no such selector.

This error occurs even if I have no changes in my model; the objects are copied straight from one identical MOC to another, then saved. The store type is the only difference as far as I can tell.

There are some NSAttributedStrings saved into binary fields; I store the data from RTFDFromRange, like this:

NSData *data = [text RTFDFromRange:NSMakeRange(0, [text length]) documentAttributes:nil];
[self willChangeValueForKey:stringName];


    [self setPrimitiveValue:data
                     forKey:stringName];
	...


I would like to use SQLite as I will have some BLOBs (pulled out as a separate entity; circumstances SQLite is recommended for, hence the migration).


What's going on? What SQLite limitation am I running into?

Cheers,
Graham Perks.
_______________________________________________

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: Baffling error migrating Core Data store
      • From: Dave Fernandes <email@hidden>
  • Prev by Date: Re: HTTP Uploading
  • Next by Date: Re: Resolution-independent toolbar icons
  • Previous by thread: [SOLVED] Re: AppleRemote Cocoa Class ( delegate issue )
  • Next by thread: Re: Baffling error migrating Core Data store
  • Index(es):
    • Date
    • Thread