• 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 SQL store looses data that XML store does not
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Core Data SQL store looses data that XML store does not
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Word count and nextWordFromIndex:forward: - not good?
  • Next by Date: RE: Subclassing NSTextView under Tiger
  • Previous by thread: Re: NsColorWell Connection Issue
  • Next by thread: Re: Core Data SQL store looses data that XML store does not
  • Index(es):
    • Date
    • Thread