Hello all, I am currently having an issue pulling all data from db whereby i.e 1 parameter is TRUE.
I am using NSPREDICATE and below is a sample code
NSManagedObjectContext *context = managedObjectContext_;
if (!context) {
// Handle the error.
NSLog(@"ERROR CONTEXT IS NIL");
}
NSEntityDescription *entity = [NSEntityDescriptio...
Hi,
Although I have a lot of experience in database development, I'm having a hard time conceptualizing linking relationships in Core Data. As I understand it, the many relationship is an NSSet attached to the one file. After reading the documentation, I've understood part of it and gotten it to work in the first import in my code bel...
Hi I'm developing an app that stores data in the iPhone, but I need to know if it's possible to export the data (as an entities, tables, .txt or xls) to a desktop because I need the data to be readable on my Computer OR do I need to create a web site to do it???
by the way.. I'm still not sure what method is more effective for this kind ...
Hi, I have a UITableView inside a UIViewController that is using ABPeoplePickerNavigationControllerDelegate.
It looks like this:
@interface MyViewController : UIViewController <ABPeoplePickerNavigationControllerDelegate> {
}
In the .xib I have a UITableView that I need to populate with data stored in CoreData. How can I go about doin...
Say I have core data objects of type "obj" that has a property "propertyA" and a one-to-many relationship with an object of type "sub" that has two properties, "propertyB" and "propertyC".
I want to fetch all the objs that have propertyA equal to a value and a sub obj with propertyB and propertyC set.
If it was just propertyA and pro...
Hi,
I'm looking into storing lots of number as Int16. Considering Core data because the rest of the models are implemented in Core data.
So I did a simple application. Core data with 1 entity and 1 attribute of Int16 type. Inserted 1 million entries in SQLite storage type and the file size turns out to be 16.2MB. Actually if I change ...
I'm writing an application that uses a UIPickerView and is storing each change to the pickers in core data (the name of the app is Wizard Blood in the iTunes store). I've had some success so far in that my -didSelectRow method successfully adds new objects to core data via the following code:
// Get context, entity, managedobject from t...
I think I understand the error message: CoreData could not fulfill a fault, but I am not sure how I should deal with it.
We have an application where we use Core Data to persist data returned from a JSON service. Today I am doing the following.
Fetch local object from persistent store and return to UI
Ask server if the object is updat...
Hello,
I would like to know how the following works in Objective-C
in my header file i have the following which is initialized from a different view controller
@interface UserLookup : UIViewController {
NSManagedObjectContext *referringObject;
}
and in my implementation file i have to pass this NSManagedObjectContext to 2 chil...
Hi Guys,
I need to add some attributes to my core data model and I am having a terrible time getting lightweight migration to work!
I keep getting the error "Cant merge models with two different entities named blah".
Here's what I've done ...
Added this code to my app delegate.
(NSPersistentStoreCoordinator*)persistentStoreCoordin...
Hi guys,
I've got a little conundrum: would it be better to use direct file management, or a CoreData SQLite database?
Here's my scenario:
I have a bunch of 'user' objects, each with a list of 'post' objects. This is easily done in CoreData, and would be great - however, the 'post' objects are downloaded from a web server, and they ea...
I've got 2 applications using Core Data with a sqlite persistent store. I've got a data loader routine that I run to populate the CoreData DB from csv files. During development, when my data changes I run the routine from the simulator to generate new databases and copy the new one into the project.
This has been working quite well for...
Reference POST:
http://stackoverflow.com/questions/3681003/core-data-basic-questions
I am able to get the Managed object context from this piece of code. It bring me to another question. I have 2 VIEW CONTROLLERS and 1 NSObject
Userlookup (VC)
UserlookupSettings(VC)
FetchProcessor (NSObject)
In sequence, Userlookup vc loads first a...
I have an Offer class (NSManagedObject subclass) that I want to use to handle offers made for purchases. One side of each offer is a buyer and the other side is the product. There is also a price. However these class instances that can be buyers have pretty different lineage and most likely will have different parent classes all the way ...
I have a common application pattern: user enters data in the main view controller, then views it in a table in a modal view controller, where rows can be deleted or modified. I was following the general design strategy from the Stanford iPhone course, but somewhere things went off the rails and all I've been getting is SIGABRT's and exc...
Occasional reader and first time question asker, so please be gentle :)
I am creating a Managed Object (Account), that is being passed into a child view controller where its being set in a property that is retained.
Account * account = [[Account alloc] initWithEntity:entity insertIntoManagedObjectContext:context];
AddAccountViewControl...
Hello,
I would like to know if I can do this
VIEW 1: use NSFetchedResultsController on TABLEA to retrieve the data, display in a table view and take actions to save it
NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:referringObject ...
I currently have an NSManagedObjectContext containing 5 Video Objects displayed in a table view.
When a user selects a row, I'm going to push in a new view controller to display object details, and give the user the option to 'add Video to favorites'.
To do this, I want to create a new NSManagedObjectContext, assign the selected Video ...
When I have a CoreData entity named, say, 'Book', which has a one-to-one relationship with another entity ('Bookmark') would I need to insert both an instance of 'Book' and an instance of 'Bookmark' into a managed object context, and manually assign the relationship?
If I perform the following code to instantiate an instance of 'Book'.....
I have a 1-to-many relationship in a Core Data graph, and I'm trying to understand the difference between using a CoreDataGeneratedAccessors method and a simple assignment to alter a relationship. For example, the Core Data Programming Guide has a department and employee example. In that example they use the CoreDataGeneratedAccessors ...