Suppose I have the following data model:
Entity Person
Attribute name String
Attribute personType String
Attribute dailyRecords
Entity CarpenterDailyRecord
Attribute numberOfNailsHammered Int
Attribute picNameOfFinishedCabinet String
Entity WindowWasherDailyRecord
Attribute nameOfBuildingWashed String
Attribute numberOfWindowsWashed I...
I successfully stored and retrieved a reference to an NSManagedObject using the example found in this site http://cocoawithlove.com/2008/08/safely-fetching-nsmanagedobject-by-uri.html
The problem is, the app crash whene triying to retrieve an NSManagedObject which has been deleted.
I tried the method isFault on the object, but it alway...
I use Core Data and I want to store this formatted date to db, field type is date, how can I do this?
date formatted: 2010-10-31
I hope I explained my scenario. Sorry for my English. Greetings.
...
Hi all,
I have developed my app using core data. It works fine in the simulator. When I deploy it to the device the DB is empty. It is 49k where it should be 484k.
Basically it is not populated. Since I don't write to the DB when the app is running I need to provide a populated DB to the App. So I copied the populated DB from th...
Hi,
I'm trying to create a xcdatamodel for my applicationa and I wanted to know how I could design the schedule timing with the course...to be more clear, I'm going to allow users to enter the day of the week and the start time and end time their course is on. and users can add as many courses. Can someone provide me with the best solu...
I have an existing database schema that is used in both an online (MySQL) and desktop (SQLLite) version of my product (data is synchronized between the two). I am now developing an iPhone version (CoreData) that I hope to synchronize with one or both of the existing products, but I am having trouble deciding how to manage entity relation...
I want to programmatically (without Lightweight Migration) create a mapping model between two models that are exactly the same, except one of the entities (there are a bunch of entities) has different attributes. Let's call this entity "Person". And let's say the destination model has
1) added a new attribute called "address"
2) delete...
Im having trouble using the @unionOfSets on my core-data objects.
I have a subclass of nsmanagedobject called list. There is a to-many relationship from list to listElements. and each listElement has a one-to-one relationship with a file.
NSLog(@"%@", [NSApp valueForKeyPath:@"delegate.mainWindowController.sidebarViewController.arrayCon...
Hi all
I am fairly new to core data technology and i searched a lot on how to add the database to a core data application.so can anybody guide me on how to integrate the database layer? i have seen the iphone tutorial on core data (i.e books example) but i am not able to understand how to .sqlite file has been included in that applicati...
This problem follows on from a previous question.
When I run the following line of code:
NSEntityDescription *outputCellEntityDescription = [NSEntityDescription entityForName:@"OutputCell"
inManagedObjectContext:[[self document] managedObjectContext]];
I get the followin...
I have several existing XML schema files with a defined data model. I would now like to incorporate the exact data model in an iPhone app, using Core Data for persistence. Does anyone know if there is a way to create a Managed Object Model other than by using the graphical tool in Xcode? It would take me a long long time to have to go th...
Hi,
For each course I am storing the day of the week the class the user has...and the start and end time and room no.
What would be the best approach in terms of data type, Like for storing time?? so that when I pull it out I can display it e.g 1:00 PM.
Thanks!
...
I have 2 entities, Task and List. Each task has a to-one relationship to a List object called "list", and there is an inverse relationship with List, which has a to-many relationship with Task called "tasks".
I'm trying to use a fetch request with an NSPredicate to get all the Task objects that belong to a specified List:
NSPredicate ...
I have a external library which includes a core data model, I would like to add a new entity to this model which has a relationship with one of the entities from the library. I know I could modify the original, but is there a way to without needing to pollute the library?
I tried just creating a new model with an entity named the same, ...
So if I have a store of parents children and the parent has a one to many relationship to children (parent.children) and they all have first names. Now, on the initial fetch for parents I can specify a sort descriptor to get them back in order of first name but how can I request the children in order? If I do a [parent.children allObje...
In my iPhone Core Data app I have it configured in a master-detail view setup.
The master view is a UITableView that lists objects of the List entity. The List entity has a to-many relationship with the Task entity (called "tasks"), and the Task entity has an inverse to-one relationship with List called "list".
When a List object is se...
I am using CoreData with iPhone SDK. I am making a notes app. I have a table with note objects displayed from my model. When a button is pressed I want to save the text in the textview to the object being edited. How do I do this? I've been trying several things but none seem to work.
Thanks
EDIT:
NSManagedObjectContext *context = [fe...
I am using a UIDatePicker with time only, How can I store this type in the core data, would it be date:S.
Thanks
...
Hi. I am trying to add value to CoreData from .plist and get from coreData and show them on UITable. I made take from .plist and send them to CoreData .But I cant take them from CoreData entity and set to some NSMutable array.. Here my codes
Edit : SOLVED
NSString *path = [[NSBundle mainBundle] pathForResource:@"FakeData"
...
Hi,
I've attempted to add the TopSongs parser and Core Data files into my application, and it now builds succesfully, with no errors or warning messages. However, as soon as the app loads, it crashes, giving the following reason:
UPDATE: I've got it all working, but my TableView doesn't show any data, and the app doesn't respond to th...