Re: Baffling error migrating Core Data store
Re: Baffling error migrating Core Data store
- Subject: Re: Baffling error migrating Core Data store
- From: Dave Fernandes <email@hidden>
- Date: Wed, 27 Jun 2007 11:19:01 -0400
I haven't had any problems using attributed strings with an SQLite
store. Though, I use NSArchiver/NSUnarchiver to convert to/from
NSData objects.
Dave
On Jun 27, 2007, at 1:17 AM, Graham Perks wrote:
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:
40utoronto.ca
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