I have two entities: Department and DepartmentNews. Every Department has one or many DepartmentNews Objects. Inside DepartmentNews, there is an newsTitle attribute, and there is an releaseDate attribute.
I want to fetch all those Department objects and sort them by their associated DepartmentNews newsTitle with the latest releaseDate.
...
I have two entities: Department and DepartmentInfo. Every Department has one or many DepartmentInfo Objects. Inside DepartmentInfo, there is an departmentName attribute.
I want to fetch all those Department objects which have a specific departmentName. So I make an NSFetchRequest for the Department entity, and use this fetch request:
N...
Where to find the documentation of the SUBQUERY feature of NSPredicate for Core Data?
...
I am building a pretty complex predicate in several iterations, and want to supply the matching values right away in the predicate.
Instead of:
[NSPredicate predicateWithFormat:@"departmentName like[c] %@"];
I want to do:
NSString *str = [NSString stringWithFormat:@"departmentName like[c] '%@'", departmentName];
[NSPredicate predica...
I got this crash log while querying an array of managed object, however, while running in the simulator it does not happen. Even in the device, sometimes it happens, sometimes not. Someone can explain to me why and what is the error?
Incident Identifier: 0ED2BB7C-5E8F-483B-AE08-8DE2C14D0C23
CrashReporter Key: e24b9614a897f92ee13ce00b7...
Hey, I'm working on the model layer for our app here.
Some of the requirements are like this:
1. It should work on iPhone OS 3.0+.
2. The source of our data is a RESTful Rails application.
3. We should cache the data locally using Core Data.
4. The client code (our UI controllers) should have as little knowledge about any network stuff ...
Basic app layout using the navigation controller template with core date:
Delegate: persistenceCoordinator, managedObjectModel, managedObjectContext
RootView: managedObjectContext (from delegate), addManagedObjectContext (using the pattern from the templates), fetchResultsController
Add/Edit view (a hierarchy for adding Object A & it...
I am storing a date attribute in Core Data using the datePicker on the iPhone. I want to then compare the date that matches a certain date using == but I can't get it to work. The greater than and less than seem to working fine though.
At first I was storing the date directly from the datePicker which also included the time information...
Is it possible to see the completed query string, with all the variables substituted to their actual values? Would be good for debugging...
...
Hello all,
In page 40 of Marcus Zarra's Core Data book, he suggests that, since NSTreeController requires the same key for accessing all the objects in the hierarchy (for example, children) and that could imply less meaningful relationship names, you can write additional accessors for the desired relationships. I think that this is a gr...
Hi,
Kindly get me the limits of following things in sqlite of iphone
No of rows that can be created
Maximum size of the database per app.
...
I am using a basic template NSPersistentDocument for a Core Data-based application. Because my program is CPU-intensive, I have been forced to multithread it. From what I know, the best way to multithread Core-Data is to create a new NSManagedObjectContext for each thread and pass the object ID between threads. My question operates un...
I have some XML data retrieved from a web service that I use to create NSManagedObjects and store in a sqlite3 backing store. In my app, I'm using NSPredicate objects to query this data by date (along with other fields). The data I have has records for every day from April 2009 through August 2010 (according to the raw XML I retrieved ...
I am creating an application, and am using Core Data as my backend data source.
I am wondering how I can manually add entries into a Core Data Entity which can be used to hold static data which will never change throughout the applications lifetime.
...
I'm working on an application backed by Core Data.
Right now, I'm saving the Object Context as and when I add or delete an entity to and from the Context.
I'm afraid it will affect the performance, so I was thinking of delaying the save.
In fact, I could delay it all the way until the application is gonna terminate.
Is it too risky to s...
I am planning to do search on large plists. say around 900 plists with data ranging from 120 to 250kb. which one is efficient for searching large plist ?? core data or sqlite ?
...
Hi I am new in iphone app, i am just trying out some apps.
I am trying to add more data in my database, i just want to see where it is stored and my database updated or not.
...
Does anyone know what this error means?
* attempt to pop an unknown autorelease pool
I am seeing this in my app that uses NSOperations in NSOperationQueue. Each operation has it's own Autorelease pool. Since each operation is parsing xml and pushing information into Core Data, I periodically 'drain' my autorelease pool and re-create i...
I have a Table View that fetches data from Core Data using FetchedResultsController and it registers for the data update.
On a second thread, I download the data from the server and update the same data (that's used by the Table View). The update is not complicated: it is just updating a BOOL field of the entity.
When I call the save o...
It's not milliseconds for sure.
I think it's microseconds, but couldn't find an authoritative source to confirm it.
...