Background
This is the same background as my previous question, except the Outline view doesn't have a fetch predicate.
I've got an NSOutlineView that shows TrainingGroup entities.
The NSOutlineView is bound to an NSTreeController
In the NSTreeController, I've got "Preserve Selection" ticked and "Select inserted objects" unticked.
Ea...
I am quite familiar with regular usage patterns of Core Data, but recently stumbled upon a problem: Imagine a simple case where I have an Entity of person, with 2 string attributes name and company. I want to make a UITableView sorted by names and divided into sections by company name. Sound simple enough:
...
personFetchController_ = [...
My application is CoreData based but they may be a common theory for all relational databases:
I have a Output-Input to-many relationship in my model. There are potentially an unlimited number of links under this relationship for each entity. What is the best way to identify a specific input or output?
The only way I have achieved thi...
I have an NSTableView with a single column, which gets its data through an NSArrayController bound to a Core Data entity. The data feed works great, and I have been able to get drag and drop working by implementing the methods
– numberOfRowsInTableView:
– tableView:objectValueForTableColumn:row:
as well as the specific drag and drop me...
I have a function that sometimes takes too long to run. I want to attempt to run it for 10 seconds, and then just kill it if it's not done. How do I do this in Objective C on the iPhone?
Creating the persistent store coordinator is failing for some users who have a lot of data in their database, because the object model merging takes to...
I'm working on a program and I have created a fetch request to grab the data that I need to print. I'm able to log information like this:
2010-10-03 16:57:10.362 lzshow7.2[2537:10b] <NSManagedObject: 0x2ca120> (entity: Song; id: 0x2afcb0 <x-coredata://CF5A85CE-BE0F-4ADC-979A-7F4214A8FB19/Song/p9> ; data: {
cueName = Freedom;
cu...
I have an application which I wrote which used to work perfectly fine. There is new requirement that all data needs to be encrypted now, so I implemented encryption by making all my core data fields type transformable and writing custom transformers for each data type which encrypts/decrypts each element of data as it is written/read fro...
Hi,
I have a core data issue where some data is deleted somehow and my iPhone app will always crash on startup. I need a way to remove those data completely when this "CoreData could not fulfill a fault for" exception is detected.
Any advice or sample code on how to do this?
Is there a best practice or a right way to handle this excep...
Hi!
I am trying to store a long long value using CoreData. A value like 119143881477165. I am storing the value in NSNumber which is created using the convenience method numberWithUnsignedLongLong. The coredata metadata has the type for this field is set to int64. The number gets stored properly, however when I retrieve this number usin...
I am trying to group results returned by Core Data. I read that you need to use "SortDescriptors" with a selector but I cant seem to get it to work?
I am trying to return group'ed "unique" name values?
http://developer.apple.com/library/ios/#documentation/cocoa/Conceptual/SortDescriptors/Concepts/Creating.html
Thanks
James
...
I have a list of custom objects being returned from a .NET WebService and am storing them using a To-Many relationship from the parent enitity with Core Data.
I want to use the NSSet as the datasource for a UITableView and push a new controller onto the stack when a row is selected.
When using [NSSet allObjects] does the array re...
Hi, I'm using transient values to provide some data within my application. The trouble is, as soon as these values are calculated, it dirties my Managed Objects, reporting that a re-save is necessary.
Is there anyway to prevent transient values from marking an object as dirty if there are no actual changes to the object graph.
Thanks,
...
I've been looking into creating a new application for iOS and after my last few apps I've been tempted to use CoreData (for benefits including saving and automatic undo/redo).
I've been a little confused when trying to implement the data-model I've been given fr the project though, since it seems that CoreData seems very much much close...
Hello,
I am very new at using Xcode and I have worked my way through most of the code necessary for my program. I have a fetch request that is returning this:
2010-10-04 15:48:01.341 lzshow7.2[7001:10b] 004 Commando March
2010-10-04 15:48:01.352 lzshow7.2[7001:10b] <NSManagedObject: 0x29e370> (entity: Song; id: 0x2ab990 <x-coredata:/...
I have an NSFetchedResultsController which displays a list of items in a table view, including a count of an associated entity. When an object is added for this association (using addXXXObject), no callbacks are called to notify my controller of the update.
How can I receive a notification of an object being added to the parent entity's...
I am working on my first core data iPhone application. I am using a navigation controller, and the root view controller displays 4 rows. Clicking the first row takes me to a second table view controller. However, when I click the back button, repeat the row tap, click the back button again, and tap the row a third time, I get an error....
I'm trying to use the NSFetchedResultsController in my app, but have a problem to sort my data. I get the following error when trying to sort the result using a relationship that is two levels down from the entity:
* Terminating app due to uncaught exception
'NSInvalidArgumentException', reason:
'to-many key not allowed here'
M...
I have about 20 entity : Event1 ... Event20
In each entity i have property values1 ... values20
I need record data in for example Event5 values8
But something wrong - may be data record in each values8 (Event1 ... Event20)
How do right?
NSString *str = [NSString stringWithFormat:@"Event%d", variable];
NSString *value = [NSStri...
Hello,
I am using iTunes file sharing in my app, and need to put Core Data's sqlite database elsewhere so that users don't fiddle with it. I have read a previous SO post regarding the best way to hide the sqlite file that Core Data uses.
There seems to be conflicting opinions regarding whether to put the database in Library/Preferen...
I have setup a data model where Student Entity has a name a 1-to-many relationship with Subject. Each Subject that he attends has a number of Class Times.
The code below sorts it, based on the Student name, this is straight forward.
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Student" inManagedObjectContext:...