I'm working on a Cocoa-Touch app, it uses CoreData and has some NSPersistentObject subclasses generated by the XCode model editor.
I've noticed that recently, when saving the context I get an error which has as user info the following part:
(gdb) po ui {
"Dangling reference to an invalid object." = <null>;
NSAffectedObjectsErro...
Hello,
I have three entities: EntityA, EntityB and EntityC connected with to-many relationships.
See schema for details:
For getting all instance of EntityA which depend from EntityB.name I use the predicate like this:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ANY EntityB.name like 'SomeName'"];
What should be ...
Does anyone have any advice on using a datastore with mapkit to provide a database of locations (Restaurants) that are query-able by location?
I would like to use Core data but importing the information into it seems like a project in itself. If anyone has good advice on converting an existing sqlite/cvs file to a coredata sqlite file t...
Hey there,
I'm using core-data and I have an entity that has an attribute called SID and another called ParentSID.
I'm trying to create a method where I can pass a fetched object from the set and it will return the lineage of that object by checking the ParentSID of each ancestor.
If the ParentSID is > 0 it should loop recursively u...
Hi all,
I'm doing an iPhone app that reads data from XML file, turn them into Core Data Managed Objects and save them.
The application is working fine, mostly, on smaller data set/XML that contains ~150 objects. I said mostly because 10% of the time, I'd get the following exception from CoreData while trying to save the context:
* Te...
I have a core data application with two NIBs, the main window with a pair of NSTableViews and a form for adding content. The form has an NSTextView and an NSTextField. I have two entities in core data, and manage the content with two NSArrayControllers. With one NSArrayController, the following code in my AppDelegate works fine for ad...
I'm working with an intermediate join table in Core Data similar to the friends example from Apple's Core Data Programming Guide. Sorry, can't post pictures yet due to no reputation points. Its a friends entity with relationships to FriendInfo intermediate join, with relationships of friends and friend info. The following link describes ...
NSXMLTypeStore is used when starting Core Data backed application by default because it's good for debugging purposes. But practice dictates that developer should use either NSBinaryStoreType, NSInMemoryStoreType or NSSQLiteStoreType store types in release builds.
How do you manage changes between debug and release builds? I believe tha...
Hi,
Does anyone know how to fetch some results sorting them alphabetically but ignoring case?
...
Hi,
I am new to Core Data, and have been trying to figure out how to set up my data model. I made a sample table to try and show how I need the data to relate.
First Name Last Name Competitor Number Gender Team Competition Game Name All Time high Competition Scores
Jon Doe 1 M Gamers January Don...
I have a situation where I want to fetch objects from my core data store by the username key, but I want the comparison to be case-insensitive. The predicate I have is this:
username IN $usernames
I then do a variable substitution with an array of strings that are the usernames I want to find. It works but is case-sensitive. I'd like ...
I have a UITableViewController managing a grouped tableView. The tableView is populated from a fetchedResultsController.
If I click the Edit button in the NavigationBar, then select a row and click the Delete button, the row is deleted and all ends well.
However, if I swipe to reveal the Delete button in a row and click the Delete bu...
Hello everyone,
I have the following 2 Entity’s in my xcdatamodel:
...
Okay, PLEASE bear with my description of my situation:
I have a Core Data model that (in a simplified description) includes a GridManager object. The GridManager holds a set of Grid objects (via a to-many relationship). The Grid object contains a set of Cell objects (via a to-many relationship).
In my app, I have a GridView that cont...
I want to ship static read-only data for use in my Core Data model. The problem is that there are obviously different persistent store types and I don't know if the format of those types is supposed to be opaque or if I'm supposed to be able to construct them by hand.
Right now I just have a plist and it's very small (maybe 30 entries t...
I see how to solve the problem but it bothers me that I don't understand why this doesn't work. I have a UIViewController subclass that uses Core Data, so it needs the NSManagedObjectContext. The controller is loaded from a nib file where it's placed under a navigation controller which is inside a tab controller.
I tried doing this in i...
The below exception is thrown on the iPhone simulator when attempting to save a Core Data SQLite store after deleting existing records using [managedObjectContext deleteObject:object];
NSInternalInconsistencyException,
reason: binding not implemented for
this SQLType 7
The entity for the records being deleted consists of just s...
My question is similar to this one, but I need further clarification. I often get exceptions during code like this:
NSError* error;
if (![managedObjectContext save:&error]) {
NSLog(@"Failed to save to data store: %@", [error localizedDescription]);
}
However, when I put a breakpoint in objc_exception_throw, I can find out that an ...
Hi guys,
I have an application that loads core data, then calls the XML Web Service to get updated data. I basically want my app, rather than to erase all the data and load everything (including new) to persist, I want it to add only the new stuff onto the existing stack (without duplication).
What's the general consensus strategy for ...
I have a core data app set up, and everything is working pretty well. But there is one little problem. When I insert a new object into my entity I have it go to my NSTableViewCell, where I can edit it to the text I want, but there's one little issue, I can edit the cell, but I can't deselect it to save it to core data, it's stuck in ed...