Core Data SQL store looses data that XML store does not
Core Data SQL store looses data that XML store does not
- Subject: Core Data SQL store looses data that XML store does not
- From: Scott Ellsworth <email@hidden>
- Date: Tue, 9 Aug 2005 11:18:29 -0700
Hi, all.
In my current app, I am seeing data vanish when I save into a sql
store, which survives when saved into an XML store.
My Location entity has six toMany relationships to itself. There are
no reverse relationships set for these, because I rarely care about
the other direction, and I have had abysmal many-to-many results in
the past.
When I create a store from an imported flat text file, scanning the
various toManys works just fine. If i save the store as an XML
store, then load that XML store back up, it is also fine. If I save
it as a SQL store, the data vanishes. Further, rummaging about with
the sqllite3 command line client, it appears that sqllite3 has been
told that these are toOne, not toMany relationships.
Printing out the NSRelationshipDescription information at runtime
indicates a toMany, but the data file does not seem to agree. Thanks
go to Chris Hanson's blog entry at <http://www.livejournal.com/users/
chanson/115621.html>, which showed me how to print out the entity and
relationship info at runtime.
I ran into this a few weeks ago, and found that changing all of the
toManys to toOnes in XCode, saving, then turning them back to toManys
and saving fixed the problem. This did not work this time.
Filed as bug 4204193.
Anyone know of a good way to debug this problem? Rebuilding the data
model would be a pain - 11 entities, each with up to twenty
attributes and a handful of relationships.
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden