• 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
Re: How to import data in Core Data app?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to import data in Core Data app?


  • Subject: Re: How to import data in Core Data app?
  • From: mmalc crawford <email@hidden>
  • Date: Thu, 1 Mar 2007 23:25:34 -0800


On Mar 1, 2007, at 9:12 AM, Arthur C. wrote:

The question is how to handle this using Core Data. In the Core Data Programming guide there is a topic on 'importing legacy data', but that only covers the merging / removing duplicates issues. What I would like to know is how to save things to file (another persistent store?), and retrieve them again. That is, using as much of Core Data as possible, as reading/writing to a file can of course be done without the framework.

It's entirely up to you how you read and write the data.
In general, to read in:
Create an in-memory store.
Read in your objects, creating for each an instance of the relevant entity.
(this is where the article in the Programming Guide is useful)
Re-create any relatonships (you'll have to give your objects IDs...)


to write out:
Fetch against each entity in turn
Write out each instance of each entity (make sure you write out object IDs for relationships)


mmalc

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: How to import data in Core Data app?
      • From: "Arthur C." <email@hidden>
References: 
 >How to import data in Core Data app? (From: "Arthur C." <email@hidden>)

  • Prev by Date: Re: UNIX SDK & Compiling under OS X
  • Next by Date: Re: Stack Trace without /usr/bin/atos
  • Previous by thread: How to import data in Core Data app?
  • Next by thread: Re: How to import data in Core Data app?
  • Index(es):
    • Date
    • Thread