Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 29, 2007, 05:51 AM   #1
MacDonaldsd
macrumors 65816
 
MacDonaldsd's Avatar
 
Join Date: Sep 2005
Location: London , UK
Core data importing entities

Im building an application that relies heavily on core data.

I was wondering if there is a way to import a single instance of a entity ?

Maybe by running a applescript or something ?
MacDonaldsd is offline   0 Reply With Quote
Old Jul 29, 2007, 02:07 PM   #2
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Do you mean that you want import an NSManagedObject from one model to another?

Do you wish to copy related objects as well?
Eraserhead is offline   0 Reply With Quote
Old Jul 30, 2007, 07:42 AM   #3
MacDonaldsd
Thread Starter
macrumors 65816
 
MacDonaldsd's Avatar
 
Join Date: Sep 2005
Location: London , UK
Basically Im doing a timetable application. So modules that are related to assessments is what im referring to here.

I would like to be able to just import assessment details. So a user can just import the details rather than typing them manually as everyone will have the same information.
MacDonaldsd is offline   0 Reply With Quote
Old Jul 30, 2007, 09:56 AM   #4
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
So you want to import the assessment information from another file into your Core Data model for your application?

In which case you'll need to read in the data using a normal (non Core Data) Cocoa data input system and then attach the data to the relevant NSManagedObject.
Eraserhead is offline   0 Reply With Quote
Old Jul 30, 2007, 12:56 PM   #5
MacDonaldsd
Thread Starter
macrumors 65816
 
MacDonaldsd's Avatar
 
Join Date: Sep 2005
Location: London , UK
Quote:
Originally Posted by Eraserhead View Post
So you want to import the assessment information from another file into your Core Data model for your application?

In which case you'll need to read in the data using a normal (non Core Data) Cocoa data input system and then attach the data to the relevant NSManagedObject.
So read it to a Normal object, then copy/create a NSManagedObject using code "behind the scenes" ?
MacDonaldsd is offline   0 Reply With Quote
Old Jul 30, 2007, 01:17 PM   #6
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Pretty much but you may not need to read it into a normal object at all as you may be able to read it as an int, double, BOOL, NSString etc. and then attach it directly to the NSManagedObject you wish to store the data in.

However you have the basic idea.
Eraserhead is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Importing Video, no data from device? MiniD3 Digital Video 6 Aug 30, 2014 10:33 AM
Importing Excel data into Word irishgrizzly Mac Applications and Mac App Store 1 Mar 5, 2014 09:48 PM
Fetch multiple entities core data Jean-Bernard iPhone and iPod touch Apps 1 Jul 30, 2013 02:55 PM
Having an issue passing data between views with Core Data. iJustinCabral iPhone/iPad Programming 0 Jul 15, 2013 10:50 PM
Saving data from custom tablecells core data luke3 iPhone/iPad Programming 0 Jul 14, 2012 07:09 PM

Forum Jump

All times are GMT -5. The time now is 10:19 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC